mirror of
https://github.com/go-gitea/gitea.git
synced 2026-07-15 20:09:18 -05:00
Git LFS push fails #2842
Closed
opened 2025-11-02 04:50:42 -06:00 by GiteaMirror
·
16 comments
No Branch/Tag Specified
main
release/v1.25
release/v1.24
release/v1.23
release/v1.22
release/v1.21
release/v1.20
release/v1.19
release/v1.18
release/v1.17
release/v1.16
release/v1.15
release/v1.14
release/v1.13
release/v1.12
release/v1.11
release/v1.10
release/v1.9
release/v1.8
v1.25.3
v1.25.2
v1.25.1
v1.25.0
v1.24.7
v1.25.0-rc0
v1.26.0-dev
v1.24.6
v1.24.5
v1.24.4
v1.24.3
v1.24.2
v1.24.1
v1.24.0
v1.23.8
v1.24.0-rc0
v1.25.0-dev
v1.23.7
v1.23.6
v1.23.5
v1.23.4
v1.23.3
v1.23.2
v1.23.1
v1.23.0
v1.23.0-rc0
v1.24.0-dev
v1.22.6
v1.22.5
v1.22.4
v1.22.3
v1.22.2
v1.22.1
v1.22.0
v1.23.0-dev
v1.22.0-rc1
v1.21.11
v1.22.0-rc0
v1.21.10
v1.21.9
v1.21.8
v1.21.7
v1.21.6
v1.21.5
v1.21.4
v1.21.3
v1.21.2
v1.20.6
v1.21.1
v1.21.0
v1.21.0-rc2
v1.21.0-rc1
v1.20.5
v1.22.0-dev
v1.21.0-rc0
v1.20.4
v1.20.3
v1.20.2
v1.20.1
v1.20.0
v1.19.4
v1.21.0-dev
v1.20.0-rc2
v1.20.0-rc1
v1.20.0-rc0
v1.19.3
v1.19.2
v1.19.1
v1.19.0
v1.19.0-rc1
v1.20.0-dev
v1.19.0-rc0
v1.18.5
v1.18.4
v1.18.3
v1.18.2
v1.18.1
v1.18.0
v1.17.4
v1.18.0-rc1
v1.19.0-dev
v1.18.0-rc0
v1.17.3
v1.17.2
v1.17.1
v1.17.0
v1.17.0-rc2
v1.16.9
v1.17.0-rc1
v1.18.0-dev
v1.16.8
v1.16.7
v1.16.6
v1.16.5
v1.16.4
v1.16.3
v1.16.2
v1.16.1
v1.16.0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3.2
v1.3.1
v1.3.0
v1.3.0-rc2
v1.3.0-rc1
v1.2.3
v1.2.2
v1.2.1
v1.2.0
v1.2.0-rc3
v1.2.0-rc2
v1.1.4
v1.2.0-rc1
v1.1.3
v1.1.2
v1.1.1
v1.1.0
v1.0.2
v1.0.1
v1.0.0
v0.9.99
Labels
Clear labels
$20
$250
$50
$500
backport/done
💎 Bounty
docs-update-needed
good first issue
hacktoberfest
issue/bounty
issue/confirmed
issue/critical
issue/duplicate
issue/needs-feedback
issue/not-a-bug
issue/regression
issue/stale
issue/workaround
lgtm/need 2
modifies/api
modifies/translation
outdated/backport/v1.18
outdated/theme/markdown
outdated/theme/timetracker
performance/bigrepo
performance/cpu
performance/memory
performance/speed
pr/breaking
proposal/accepted
proposal/rejected
pr/wip
pull-request
reviewed/wontfix
💰 Rewarded
skip-changelog
status/blocked
topic/accessibility
topic/api
topic/authentication
topic/build
topic/code-linting
topic/commit-signing
topic/content-rendering
topic/deployment
topic/distribution
topic/federation
topic/gitea-actions
topic/issues
topic/lfs
topic/mobile
topic/moderation
topic/packages
topic/pr
topic/projects
topic/repo
topic/repo-migration
topic/security
topic/theme
topic/ui
topic/ui-interaction
topic/ux
topic/webhooks
topic/wiki
type/bug
type/deprecation
type/docs
type/enhancement
type/feature
type/miscellaneous
type/proposal
type/question
type/refactoring
type/summary
type/testing
type/upstream
Mirrored from GitHub Pull Request
No Label
type/question
Milestone
No items
No Milestone
Projects
Clear projects
No project
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/gitea#2842
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @rainwf2 on GitHub (Jan 31, 2019).
[x]):Description
Push non-LFS files works fine.
This is a similar issue to gitea #3101. Steps to reproduce contained in gitea #3101.
If I clone a localhost repo, it works. If I clone from a network remote, it fails. It fails on my server as well as try.gitea.io. When using a network remote I change to https. I have tried the admin login info as well another collaborator. I have tried using an access token for both the admin and the collaborator – no luck.
The error message is slightly different from #3101 in that “batch” appears at the end of the URL:
Uploading LFS objects: 0% (0/1), 0 B | 0 B/s, done
batch response: Repository or object not found: https://try.gitea.io/rainwf/test-lfs.git/info/lfs/objects/batch
Check that it exists and that you have proper access to it
error: failed to push some refs to <won’t let me use more than 2 links, same as previous URL>
I have tried so many variations, I am not sure which logs would be helpful.
Any help would be appreciated.
...
Screenshots
@rainwf2 commented on GitHub (Jan 31, 2019):
I clear Windows credentials between each attempt, so that it prompts me for user:password each time.
@zeripath commented on GitHub (Jan 31, 2019):
Please try v1.7.1 - there was a bug in v1.7 and it would be good to exclude this before investigating first
@rainwf2 commented on GitHub (Jan 31, 2019):
I assume I can just update gitea.exe leave everything else in place. Or do I need to start from scratch?
@zeripath commented on GitHub (Jan 31, 2019):
I think so.
@rainwf2 commented on GitHub (Feb 1, 2019):
Fundamental question: Must gitea admin and collaborator user names exist as valid domain names on the server? Our organisation requires user names to have a space between first and last name: e.g. "John Doe". Gitea will not allow spaces in the user name, so I have created a collaborator name of "jdoe". Is this the root of my problem. If so, we will not be able to use gitea.
@rainwf2 commented on GitHub (Feb 1, 2019):
After reading gitea #1641, let me be specific: our organisation requires space in "username".
@zeripath commented on GitHub (Feb 1, 2019):
No I don't think so.
Ok, I think we need a bit more information about how you're logging in to Gitea and how you've set it up.
By: "clone a localhost" you mean, you are on the machine that runs Gitea and you do:
git clone http://localhost/user/repo.gitand it gets the LFS objects correctly?Where does the client then collect the LFS objects from? How do you login? Is this local db login or LDAP/domain login?
Then when you attempt to clone from network, where exactly are you trying to clone from? You have to change the Gitea rooturl to match this url. Giteas LFS server can only report one address so you cannot have LFS work by reporting localhost for localhost queries and some other address for non-localhost queries. (This could be fixed but getting the configuration right might be very hard.)
Assuming you changed the config, how are you logging in? Local or LDAP/AD? Which username?
BTW try.gitea.io doesn't have LFS setup so isn't a good test case.
@rainwf2 commented on GitHub (Feb 1, 2019):
First question = yes
Second question = localhost – same URL
Third question = login with collaborator username and password – “jdoe”
Fourth question = local db login
Fifth question = tried both http://:3000/gitea-admin/lfs-test.githttp://%3cserver%3e:3000/gitea-admin/lfs-test.git and https://:3000/gitea-admin/lfs-test.githttps://%3cserver%3e:3000/gitea-admin/lfs-test.git
gitea-admin is admin I set up when installing Gitea
gitea-admin created the test-lfs repo
LFS URL is same. I am not specifically referencing the LFS URL in this test
Did not change the config from the values entered during initial run of Gitea.
Sixth question = logging in as “jdoe” NOT as “John Doe” which is the domain username
Seventh question = assume local, since I did not set up LDAP/AD
Good to know about try.gitea.io – suggestion some notation on site to notify users or perhaps I missed it.
@zeripath commented on GitHub (Feb 1, 2019):
Ugh the formatted of that reply was totally messed up. You might wanna pop on to GitHub to fix it up. -- weirdly this only seems to affect the mobile phone view...
I think you're saying, that when you moved from testing on the localhost you didn't change the configuration of Gitea to re set its root url from localhost. That won't work. You have to change the Gitea root url and restart Gitea.
You will also have to reclone the git repository from this Gitea as getting LFS to change its URL can be very difficult indeed. Check your .git/config for the cloned repo to ensure that LFS is pointing to the correct place.
If everything is definitely pointing to the correct place then we need to think a bit more.
@rainwf2 commented on GitHub (Feb 1, 2019):
Format looks fine on https://github.com/go-gitea/gitea/issues/5920
I have Gitea installed on 2 computers, my laptop which I reference as localhost, and a server which I reference as . Each is set up independently with v1.7.1. One difference is that the server is on our company domain and I access it with VPN.
In both cases I did a fresh install of 1.7.1. When I access gitea on my laptop, I use http://localhost:3000/gitea-admin/test-lfs.git
When I access gitea on the server, I use https://:3000/gitea-admin/test-lfs.git, although I have also tried http://:3000/gitea-admin/test-lfs.git
In both cases, I use "jdoe" . My domain name is "John Doe" however.
It works when I reference gitea on my laptop but not on the server.
I hope this is more clear.
@zeripath commented on GitHub (Feb 1, 2019):
Ok, are the two clones are completely separate?
Is the LFS URL in .git/config pointing to the correct place?
When you created the repository on the server, how did you create this - Did you push it afresh or just copy the data over in the filesystem? When you pushed it are you certain you also pushed over the LFS objects? If the clone had an LFS config already it can be very difficult to tell it to use the new one. If you just copied over the filesystem did you also copy the database? (When you create LFS objects they're given an sha256sum that has to be registered with the repository id in the database. Even if the file is in the LFS filesystem the database needs to know that they're in that repo)
Check that the files are in the LFS filesystem on the repository. Try creating a completely new test LFS repository and pushing it to the server.
@rainwf2 commented on GitHub (Feb 1, 2019):
Yes.
laptop [lfs "http://localhost:3000/gitea-admin/test-lfs.git/info/lfs"]
server [lfs "https://:3000/gitea-admin/test-lfs.git/info/lfs"]
On laptop, used localhost:3000 logged in as git-admin, created lfs-test.git fresh.
Logged into server with domain credentials, used localhost:3000 logged in as git-admin, created lfs-test.git fresh.
Separate fresh repos on laptop and server.
Separate fresh clone on laptop from laptop gitea (works)
Separate fresh clone on laptop, connected to domain, from server (doesn't work)
Performed steps in gitea #3101 to test for repo on laptop and then server.
Removed clone on laptop before testing with server.
In both cases only trying to push .gitattributes and foobar.txt. The repo is empty beforehand, just like gitea #3101
@zeripath commented on GitHub (Feb 2, 2019):
In case it's not clear I'm very confused as to why you're having so much difficulty.
Sorry did you just mean what you said:
You shouldn't be able to do that. Gitea can only work with one external address - everything has to be that. What does your app.ini look like? Here's what mine looks like on my external server that is proxy passed through nginx.
Note that although the server is actually listening on port 3000 it's being proxied through to port 80 by nginx and therefore my ROOT_URL doesn't have the 3000. Similarly I proxy through to a
/gitsuburl hence the/git.I see you've written that the server url is "http://:3000" - I've been presuming that you're censoring the host address - but if that's your address that's not going to work. Gitea needs a fixed domain.
Now if your server is sitting behind IIS take a look at:
https://github.com/go-gitea/gitea/issues/5888#issuecomment-459950629
@rainwf2 commented on GitHub (Feb 4, 2019):
It now works.
I found my first error installing Gitea on the server. For testing, I am using SQLite3. During initalization via the gitea web interface, it asks for the path to the database, with the default "data/gitea.db" and the note "File path for the SQLite3 database. Enter an absolute path if you run Gitea as a service.", which I am. This is different from the LFS and repository location defaults which are of the form "C:\xxx\xxx" My use of Git bash caused me to provide the path "/d /gitea/data/gitea.db". While using Window Explorer, I discovered that Gitea had created a folder "d/gitea/data" containing gitea.db. I have now corrected the path to "D:/gitea/data/gitea.db".
My second problem was that I did not clear the SSH port number during initialization to disable SSH.
Also, after thinking the process through, I realized that my server URL should be http rather than https, since I have done nothing to set up SSH on the server.
I am working within a domain with local access to the server. The server is not exposed to the outside world. My reading is that http should be an acceptable way to access gitea on the server. Please correct me if I am wrong.
@zeripath commented on GitHub (Feb 4, 2019):
@rainwf2 sorry that was so hard to debug. Was there any hint as to what the underlying problem was in the logs anywhere?
Http is absolutely fine for your use case.
@rainwf2 commented on GitHub (Feb 4, 2019):
Only log messages similar to the original error I posted. Not on server just now, but something like LFS REQ with status of 200 and reference to path with the batch directory missing.
Thanks for you help.
From: zeripath [notifications@github.com]
Sent: Monday, February 4, 2019 8:40 AM
To: go-gitea/gitea
Cc: Fred Raines; Mention
Subject: Re: [go-gitea/gitea] Git LFS push fails (#5920)
@rainwf2https://github.com/rainwf2 sorry that was so hard to debug. Was there any hint as to what the underlying problem was in the logs anywhere?
Http is absolutely fine for your use case.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/go-gitea/gitea/issues/5920#issuecomment-460253272, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ArWfIqnNB8XbdIoqJt2__n7I978oNAQaks5vKDhmgaJpZM4ac3x8.
LEGAL DISCLAIMER: M.C. Dean, Inc. and its subsidiaries considers this e-mail and any files transmitted with it to be protected, proprietary or privileged information intended solely for the use of the named recipient(s). Any disclosure of this material or the information contained herein, in whole or in part, to anyone outside of the intended recipient or affiliates is strictly prohibited. M. C. Dean, Inc. accepts no liability for the content of this e-mail or for the consequences of any actions taken on the basis of the information contained in it, unless that information is subsequently confirmed in writing. Employees of M.C. Dean, Inc. are instructed not to infringe on any rights of the recipient; any such communication violates company policy. If you are not the intended recipient, any disclosure, copying, distribution, or action taken or omitted in reliance on this information is strictly prohibited by M.C. Dean, Inc.; please notify the sender immediately by return e-mail, delete this communication and destroy all copies.