Repository navigation
Closed
Description
I can't seem to push to a contributor's fork anymore:
ERROR: Authentication error: Authentication required: You must have push access to verify locks
error: failed to push some refs to '[email protected]:/lehonma/the-online-brt-planning-guide'
Context
Repository: https://github.com/ITDP/the-online-brt-planning-guide
Maintainer fork: https://github.com/lehonma/the-online-brt-planning-guide
PR/fork branch: ITDP/the-online-brt-planning-guide#158 (Chapter_17)
GIT_TRACE=1 GIT_CURL_VERBOSE=1 git push
03:57:43.271542 git.c:371 trace: built-in: git 'push'
03:57:43.275577 run-command.c:369 trace: run_command: 'ssh' '[email protected]' 'git-receive-pack '\''/lehonma/the-online-brt-planning-guide'\'''
Host key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8
+---[RSA 2048]----+
| =+o...+=o.. |
|o++... *o . |
|*.o. *o. |
|oo. ..o.= . |
|.+o. .. S = |
|*=+ . o = . |
|OE . . o |
| o . |
| |
+----[SHA256]-----+
03:57:44.841000 run-command.c:369 trace: run_command: '.git/hooks/pre-push' 'lehonma' '[email protected]:/lehonma/the-online-brt-planning-guide'
03:57:44.853271 git.c:595 trace: exec: 'git-lfs' 'pre-push' 'lehonma' '[email protected]:/lehonma/the-online-brt-planning-guide'
03:57:44.853361 run-command.c:369 trace: run_command: 'git-lfs' 'pre-push' 'lehonma' '[email protected]:/lehonma/the-online-brt-planning-guide'
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: ssh: [email protected] git-lfs-authenticate /lehonma/the-online-brt-planning-guide upload
trace git-lfs: HTTP: POST https://lfs.github.com/lehonma/the-online-brt-planning-guide/locks/verify
> POST /lehonma/the-online-brt-planning-guide/locks/verify HTTP/1.1
> Host: lfs.github.com
> Accept: application/vnd.git-lfs+json; charset=utf-8
> Authorization: RemoteAuth ABv2MMTOyObxyCZruK4PxfmaBMogpT4Sks5ZBd9KwA==
> Content-Length: 2
> Content-Type: application/vnd.git-lfs+json; charset=utf-8
> User-Agent: git-lfs/2.1.0 (GitHub; linux amd64; go 1.8; git bd2c9987)
>
{}trace git-lfs: HTTP: 403
< HTTP/1.1 403 Forbidden
< Content-Length: 155
< Content-Type: application/vnd.git-lfs+json
< Date: Sun, 30 Apr 2017 06:57:46 GMT
< X-Github-Request-Id: D3D2:6633:259B82A:30791B6:59058AEA
<
trace git-lfs: HTTP: {"documentation_url":"https://github.com/contact","message":"You must have push access to verify locks","request_id":"D3D2:6633:259B82A:30791B6:59058AEA"}
{"documentation_url":"https://github.com/contact","message":"You must have push access to verify locks","request_id":"D3D2:6633:259B82A:30791B6:59058AEA"}
ERROR: Authentication error: Authentication required: You must have push access to verify locks
error: failed to push some refs to '[email protected]:/lehonma/the-online-brt-planning-guide'
git lfs env
git-lfs/2.1.0 (GitHub; linux amd64; go 1.8; git bd2c9987)
git version 2.12.2
Endpoint=https://github.com//ITDP/the-online-brt-planning-guide.git/info/lfs (auth=none)
[email protected]:/ITDP/the-online-brt-planning-guide
Endpoint (craice)=https://github.com//craice/the-online-brt-planning-guide.git/info/lfs (auth=none)
[email protected]:/craice/the-online-brt-planning-guide
Endpoint (aszasz)=https://github.com//aszasz/the-online-brt-planning-guide.git/info/lfs (auth=none)
[email protected]:/aszasz/the-online-brt-planning-guide
Endpoint (thaiscmlima)=https://github.com/thaiscmlima/the-online-brt-planning-guide.git/info/lfs (auth=none)
Endpoint (jonasmalacofilho)=https://github.com/jonasmalacofilho/the-online-brt-planning-guide.git/info/lfs (auth=none)
[email protected]:jonasmalacofilho/the-online-brt-planning-guide.git
Endpoint (brtpguy)=https://github.com//brtpguy/the-online-brt-planning-guide.git/info/lfs (auth=none)
[email protected]:/brtpguy/the-online-brt-planning-guide
Endpoint (dcpaschall)=https://github.com//dcpaschall/the-online-brt-planning-guide.git/info/lfs (auth=none)
[email protected]:/dcpaschall/the-online-brt-planning-guide
Endpoint (lehonma)=https://github.com//lehonma/the-online-brt-planning-guide.git/info/lfs (auth=none)
[email protected]:/lehonma/the-online-brt-planning-guide
LocalWorkingDir=/home/j/Code/tobrtpg
LocalGitDir=/home/j/Code/tobrtpg/.git
LocalGitStorageDir=/home/j/Code/tobrtpg/.git
LocalMediaDir=/home/j/Code/tobrtpg/.git/lfs/objects
LocalReferenceDir=
TempDir=/home/j/Code/tobrtpg/.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=none
AccessUpload=none
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"
Metadata
Metadata
Assignees
Labels
No labels
Activity
[-]Authentication required to push to a contributors fork[/-][+]Authentication required to push to a contributor's fork[/+]ttaylorr commentedon Apr 30, 2017
Hi @jonasmalacofilho, thanks for opening this. I think what's going on here is that since LFS is not supported on GitHub in forked repositories, we're responding with a 403 (unauthenticated, forbidden) when LFS runs the pre-push locks verification check.
That 403 halts the subsequent push by returning a non-zero exit code from the pre-push hook, and therefore does not allow you to push.
I'll be able to take a greater look into this tomorrow, but in the meantime, you should be able to run:
and try the push again.
jonasmalacofilho commentedon Apr 30, 2017
Hi @ttaylorr , thanks for the help. I had thought of forcing a setting like that, but couldn't figure it out exactly on my own.
However, after setting that up, the issue still remains.
ttaylorr commentedon May 1, 2017
See: #2191.
technoweenie commentedon May 1, 2017
@jonasmalacofilho I think your
git pushcommand is too vague. If you rungit push origin master, it'll only try to push toITDP/the-online-brt-planning-guide. You don't seem to have push access tolehonma/the-online-brt-planning-guide.jonasmalacofilho commentedon May 1, 2017
@ttaylorr I'm not sure why you referred me to that issue (and closed this one). The parent repository has LFS objects already (and I have commit access to it as well); so does the fork.
jonasmalacofilho commentedon May 1, 2017
@technoweenie I should have clarified that, thanks: in this instance,
git pushis equivalent togit push lehonma Chapter_17because that has been set as upstream when the branch was initially checked out.EDIT: regarding access to thepository repo, the PR had "allow edits from maintainers" enabled.
jonasmalacofilho commentedon May 1, 2017
Also, some other clarifications:
technoweenie commentedon May 1, 2017
Ah, that makes sense. LFS doesn't support per-branch permissions like this right now. It's a relatively newer GitHub feature, so it wasn't really included in the initial LFS API design. There was an older attempt to get this in (#1456), but it was never finished.
Are you still having problems after turning
lfs.locksverifyoff for that repository? What's the error?@ttaylorr: I think we should talk about trying to get #1456 into v2.2.0. With the refactors in v2.0, most of this work will likely have to be re-done. Also, need to think about how this affects the locking API too.
jonasmalacofilho commentedon May 1, 2017
After running
, the issue looks to be the same...
GIT_TRACE=1 GIT_CURL_VERBOSE=1 git push lehonma Chapter_17technoweenie commentedon May 1, 2017
Ah, I think Taylor gave you the wrong URL to fix the config. Try this:
jonasmalacofilho commentedon May 1, 2017
@technoweenie oh, thanks... still:
technoweenie commentedon May 1, 2017
Bah, ok. Hit something a little surprising, this should work:
This has to do with how LFS guesses the server url based on the Git remote. Taylor forgot the
.gitextension for the repository url, and I went way off into left field with mylfs.github.comsuggestion.We should be able to make a simple tweak to let Taylor's suggestion work in the next patch release.
jonasmalacofilho commentedon May 2, 2017
Actually, that didn't work either.
But after a few tests I figured it out:
Basically, it required the same endpoint URL that's listed in
git lfs env.technoweenie commentedon May 2, 2017
Oh interesting. The fact that works looks like a bug, actually. Your ssh remote is specified like this:
[email protected]:/ITDP/the-online-brt-planning-guide, with an extra forward slash. That extra slash is retained when converted to a URL. I think we'll have to fix that in v2.1.1, since it's totally surprising behavior.jonasmalacofilho commentedon May 3, 2017
@technoweenie you're right!
When I managed to push I thought the relevant part was the
/info/lfsat the end of the URL... but after testing it some more it is indeed just that doubled forward slash.reuben commentedon May 30, 2020
Trying the solution posted here now, I get a message about the config being ignored when I try to push:
bk2204 commentedon Jun 1, 2020
Those keys can't be stored in
.lfsconfig; you'll need to store them in the regular Git config file instead.