Skip to content

[Bug] LFS: Authentication required: Authorization error lfs/locks/verify #12732

Open
@v-byte-cpu

Description

@v-byte-cpu
  • Gitea version (or commit ref): 1.12.1
  • Operating system: Linux-based
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

git lfs push fails with 401 error. GIT_TRACE=1 GIT_CURL_VERBOSE=1 git lfs push devspace develop logs:

21:51:01.345336 git.c:704               trace: exec: git-lfs push devspace develop
21:51:01.345473 run-command.c:663       trace: run_command: git-lfs push devspace develop
21:51:01.362451 trace git-lfs: exec: git 'version'
21:51:01.368368 trace git-lfs: exec: git '-c' 'filter.lfs.smudge=' '-c' 'filter.lfs.clean=' '-c' 'filter.lfs.process=' '-c' 'filter.lfs.required=false' 'rev-parse' 'HEAD' '--symbolic-full-name' 'HEAD'
21:51:01.373349 trace git-lfs: exec: git 'config' '-l'
21:51:01.376857 trace git-lfs: Upload refs [develop] to remote devspace
21:51:04.428075 trace git-lfs: run_command: ssh -- git@git.service.devspace git-lfs-authenticate user/test.git upload
21:51:07.284189 trace git-lfs: HTTP: POST http://git.service.devspace/user/test.git/info/lfs/locks/verify
> POST /user/test.git/info/lfs/locks/verify HTTP/1.1
> Host: git.service.devspace
> Accept: application/vnd.git-lfs+json; charset=utf-8
> Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJSZXBvSUQiOjUsIk9wIjoidXBsb2FkIiwiVXNlcklEIjoxLCJleHAiOjE1OTkzMzMwNjYsIm5iZiI6MTU5OTMzMTg2Nn0.peeWGRaBIF45a1xKHYIs8fxGnz1Smjt1j3_DZDsy0mg
> Content-Length: 37
> Content-Type: application/vnd.git-lfs+json; charset=utf-8
> User-Agent: git-lfs/2.11.0 (GitHub; linux amd64; go 1.14.4)
> 
{"ref":{"name":"refs/heads/develop"}}21:51:07.488902 trace git-lfs: HTTP: 401


< HTTP/1.1 401 Unauthorized
< Content-Length: 26
< Content-Type: text/plain; charset=utf-8
< Date: Sat, 05 Sep 2020 18:51:06 GMT
< Set-Cookie: lang=en-US; Path=/; Max-Age=2147483647
< Set-Cookie: i_like_gitea=cc7ff22ea4d0d7b4; Path=/; HttpOnly
< Set-Cookie: _csrf=Ec9qdXFh0CAPGJo1IQwmS4C6cQI6MTU5OTMzMTg2NjYxODE2NDg3Mw; Path=/; Expires=Sun, 06 Sep 2020 18:51:06 GMT; HttpOnly
< Www-Authenticate: Basic realm=gitea-lfs
< X-Frame-Options: SAMEORIGIN
< 
WARNING: Authentication error: Authentication required: Authorization error: http://git.service.devspace/user/test.git/info/lfs/locks/verify
Check that you have proper access to the repository
21:51:07.489590 trace git-lfs: tq: running as batched queue, batch size of 100
21:51:07.489976 trace git-lfs: run_command: git rev-list --objects --ignore-missing --stdin --
21:51:07.497737 trace git-lfs: filepathfilter: rewrite ".git" as "**/.git/**"
21:51:07.497812 trace git-lfs: filepathfilter: rewrite "**/.git" as "**/.git"
21:51:07.497948 trace git-lfs: filepathfilter: accepting "tmp"

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue/confirmedIssue has been reviewed and confirmed to be present or accepted to be implementedtopic/lfstype/bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions