Skip to content

Authentication required : You must have push access to verify locks error. #2291

Closed
@arun-kambhammettu

Description

@arun-kambhammettu

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.

#2114
#2219
#1852

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

jipexu commented on Jun 2, 2017

@jipexu

Hi have you read this ? perhaps ..
#2284

arun-kambhammettu

arun-kambhammettu commented on Jun 2, 2017

@arun-kambhammettu
Author

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

technoweenie commented on Jun 2, 2017

@technoweenie
Contributor

That looks like a server issue with deploy keys. For now, try removing .git/hooks/pre-push.

arun-kambhammettu

arun-kambhammettu commented on Jun 2, 2017

@arun-kambhammettu
Author

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'

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'`

and still, issue remains.

technoweenie

technoweenie commented on Jun 2, 2017

@technoweenie
Contributor

I'm trying to help you skip the pre-push hook. You inadvertently re-installed it :) . Try this:

$ rm .git/hooks/pre-push
$ git push

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

arun-kambhammettu commented on Jun 2, 2017

@arun-kambhammettu
Author

lol, thanks technoweenie.

It worked !!

arun-kambhammettu

arun-kambhammettu commented on Jun 2, 2017

@arun-kambhammettu
Author

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

josemariasola commented on Jul 1, 2017

@josemariasola

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.

jeffreydwalter

jeffreydwalter commented on Mar 1, 2018

@jeffreydwalter

@technoweenie I ran into this issue tonight as well. What exactly is the side effect of your work-around?

dcecile

dcecile commented on Mar 15, 2018

@dcecile

Also, what was the client update for making the workaround easier...? 👀

26 remaining items

bk2204

bk2204 commented on Jul 14, 2021

@bk2204
Member

Because this indicates an authentication problem and not a problem in the Git LFS client.

JimBobSquarePants

JimBobSquarePants commented on Jul 14, 2021

@JimBobSquarePants

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

bk2204 commented on Jul 14, 2021

@bk2204
Member

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

JimBobSquarePants commented on Jul 14, 2021

@JimBobSquarePants

Thanks for the clarification, that makes sense now!

295060456

295060456 commented on Jul 31, 2021

@295060456

I'm trying to help you skip the pre-push hook. You inadvertently re-installed it :) . Try this:

$ rm .git/hooks/pre-push
$ git push

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.

hello can you tell me how works the file is?

marcelocra

marcelocra commented on Oct 10, 2022

@marcelocra

I use git-lfs with Git Credential Manager and multi-users setup. This error happened until I added the lfs 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 ran git 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

fengyuentau commented on Nov 13, 2022

@fengyuentau

I was having the same issue, and used the work around that deletes the pre-push hook for several times before doing a more permanent fix by changing my gitconfig: git config --local lfs.https://github.com/.locksverify false

However, I now have a large number of tracked large files that weren't uploaded to github. How can I restage these files even though no changes have been made, to try and force them to be reuploaded with git lfs?

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @technoweenie@gaelicWizard@haikusw@dcecile@ihnorton

        Issue actions

          Authentication required : You must have push access to verify locks error. · Issue #2291 · git-lfs/git-lfs