Closed
Description
I'm having trouble while pushing code to a repository, I'm the owner of the repository. I'm working on it from a year, never faced this issue. Also, I have another repository which is working fine.
I have checked several tickets, with the same issue, nothing fixed the problem.
below are the results of these commands,
git lfs env
git-lfs/2.1.1 (GitHub; darwin amd64; go 1.8.1; git 3314e287)
git version 2.8.4 (Apple Git-73)
Endpoint=https://github.com/AccuRadioGit/v5.git/info/lfs (auth=basic)
SSH=git@github.com:AccuRadioGit/v5.git
LocalWorkingDir=/Users/arun/envs/v5
LocalGitDir=/Users/arun/envs/v5/.git
LocalGitStorageDir=/Users/arun/envs/v5/.git
LocalMediaDir=/Users/arun/envs/v5/.git/lfs/objects
LocalReferenceDir=
TempDir=/Users/arun/envs/v5/.git/lfs/tmp
ConcurrentTransfers=3
TusTransfers=false
BasicTransfersOnly=false
SkipDownloadErrors=false
FetchRecentAlways=false
FetchRecentRefsDays=7
FetchRecentCommitsDays=0
FetchRecentRefsIncludeRemotes=true
PruneOffsetDays=3
PruneVerifyRemoteAlways=false
PruneRemoteName=origin
AccessDownload=basic
AccessUpload=basic
DownloadTransfers=basic
UploadTransfers=basic
git config filter.lfs.process = "git-lfs filter-process"
git config filter.lfs.smudge = "git-lfs smudge -- %f"
git config filter.lfs.clean = "git-lfs clean -- %f"`
GIT_TRACE=1 GIT_CURL_VERBOSE=1 git push
12:23:27.942535 git.c:350 trace: built-in: git 'push'
12:23:27.945379 run-command.c:336 trace: run_command: 'ssh' 'git@github.com' 'git-receive-pack '\''AccuRadioGit/v5.git'\'''
12:23:28.640999 run-command.c:336 trace: run_command: '.git/hooks/pre-push' 'origin' 'git@github.com:AccuRadioGit/v5.git'
12:23:28.658604 git.c:563 trace: exec: 'git-lfs' 'pre-push' 'origin' 'git@github.com:AccuRadioGit/v5.git'
12:23:28.659289 run-command.c:336 trace: run_command: 'git-lfs' 'pre-push' 'origin' 'git@github.com:AccuRadioGit/v5.git'
trace git-lfs: run_command: 'git' config -l
trace git-lfs: run_command: 'git' version
trace git-lfs: tq: running as batched queue, batch size of 100
trace git-lfs: run_command: ssh -- git@github.com git-lfs-authenticate AccuRadioGit/v5.git upload
trace git-lfs: HTTP: POST https://lfs.github.com/AccuRadioGit/v5/locks/verify
> POST /AccuRadioGit/v5/locks/verify HTTP/1.1
> Host: lfs.github.com
> Accept: application/vnd.git-lfs+json; charset=utf-8
> Authorization: RemoteAuth ACMC1ML8CkJ5TraNAQ0Icb46e_GZ_xEPks5ZMfNxwA==
> Content-Length: 2
> Content-Type: application/vnd.git-lfs+json; charset=utf-8
> Github-Deploy-Key: 17457033
> User-Agent: git-lfs/2.1.1 (GitHub; darwin amd64; go 1.8.1; git 3314e287)
>
{}trace git-lfs: HTTP: 401
< HTTP/1.1 401 Unauthorized
< Content-Length: 155
< Content-Type: application/vnd.git-lfs+json
< Date: Fri, 02 Jun 2017 17:23:29 GMT
< X-Github-Request-Id: D3CB:5AF0:51A430B:66CD3D3:59319F11
<
trace git-lfs: HTTP: {"documentation_url":"https://github.com/contact","message":"You must have push access to verify locks","request_id":"D3CB:5AF0:51A430B:66CD3D3:59319F11"}
{"documentation_url":"https://github.com/contact","message":"You must have push access to verify locks","request_id":"D3CB:5AF0:51A430B:66CD3D3:59319F11"}
ERROR: Authentication error: Authentication required: You must have push access to verify locks
error: failed to push some refs to 'git@github.com:AccuRadioGit/v5.git'
git remote -v
origin git@github.com:AccuRadioGit/v5.git (fetch) origin git@github.com:AccuRadioGit/v5.git (push)
Please help me to resolve this issue.
Activity
jipexu commentedon Jun 2, 2017
Hi have you read this ? perhaps ..
#2284
arun-kambhammettu commentedon Jun 2, 2017
Actually, yes.
when I hit this command, in my repository directory.
cat .git/hooks/post-checkout
cat: .git/hooks/post-checkout: No such file or directory
Now, I got no clue what to do.
technoweenie commentedon Jun 2, 2017
That looks like a server issue with deploy keys. For now, try removing
.git/hooks/pre-push
.arun-kambhammettu commentedon Jun 2, 2017
Thanks technoweenie, I tried this and here is the output.
`(envs) Aruns-MacBook-Pro:v5 arun$ git lfs pre-push
This should be run through Git's pre-push hook. Run
git lfs update
to install `it.`(envs) Aruns-MacBook-Pro:v5 arun$ git lfs update
Updated git hooks.
(envs) Aruns-MacBook-Pro:v5 arun$ git push'
and still, issue remains.
technoweenie commentedon Jun 2, 2017
I'm trying to help you skip the pre-push hook. You inadvertently re-installed it :) . Try this:
Sorry about the terrible workaround. I want to have a small client update out next week to make the workaround easier. I've also filed an internal bug about the server issue for a more permanent fix.
arun-kambhammettu commentedon Jun 2, 2017
lol, thanks technoweenie.
It worked !!
arun-kambhammettu commentedon Jun 2, 2017
Since my issue got fixed and there will be a permanent fix soon, I am closing this issue. I'll re-open this ticket if I face the same problem again. Thanks everyone.
josemariasola commentedon Jul 1, 2017
I had the same issue. In one setup I have the Windows GitHub Electron based app, in the other the official app.
technoweenie’s workaround worked just fine.
Authentication error
. after rm some hooks, push ok, but large files can not be downloaded. #2564jeffreydwalter commentedon Mar 1, 2018
@technoweenie I ran into this issue tonight as well. What exactly is the side effect of your work-around?
dcecile commentedon Mar 15, 2018
Also, what was the client update for making the workaround easier...? 👀
26 remaining items
bk2204 commentedon Jul 14, 2021
Because this indicates an authentication problem and not a problem in the Git LFS client.
JimBobSquarePants commentedon Jul 14, 2021
I'll admit, I'm a little confused. Before adding Git LFS to my repository I was able to push to forks. Since then I am unable to do so without the workaround.
bk2204 commentedon Jul 14, 2021
What you're seeing is a limitation in GitHub's particular implementation of the Git LFS protocol and not in Git LFS itself. This repository is for the Git LFS open source client, not any specific server implementation, such as GitHub or GitLab. As mentioned in the contributing documentation, the place to contact GitHub about their implementation is through GitHub Support.
JimBobSquarePants commentedon Jul 14, 2021
Thanks for the clarification, that makes sense now!
295060456 commentedon Jul 31, 2021
hello can you tell me how works the file is?
marcelocra commentedon Oct 10, 2022
I use
git-lfs
with Git Credential Manager and multi-users setup. This error happened until I added thelfs
key in the local.git/config
.git-lfs
seems to do that automatically for us, but for some reason in this case it doesn't. For it to do, I removed the username part from the github url and rangit lfs push origin main --dry-run --all
. This won't actually do anything aside from updating the config and show you what it would do.Then I added the username part again, ran without the
--dry-run
option and it worked!fengyuentau commentedon Nov 13, 2022
It works with
git config --local lfs.https://github.com/.locksverify false
. I am managing a repo with git-lfs enabled and was having trouble pushing commits to contributors' pull requests. This command saves my day.