Can't use LFS in organization's repo, even though user is owner #6735

Closed
opened 2025-11-02 07:05:03 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @lonix1 on GitHub (Jan 22, 2021).

  • Gitea version (or commit ref): 1.13.1
  • Git version: 2.25.1
  • Operating system: linux ubuntu, gitea running locally in docker
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No It didn't work for me, maybe it's a different version?
  • Log gist:

Description

This bug has come up many times, e.g. #5920, and seems to be resolved, but it still exists (At least for me).

  • GITEA: create organization
  • GITEA: create repo within that organization; I am now an "Owner" of that org and repo
  • LOCAL: create repo with lfs support: git init; git lfs install
  • LOCAL: setup lfs: git lfs track '*.bin'; git add .gitattributes
  • LOCAL: create binary file: echo foo > foo.bin; git add foo.bin
  • LOCAL: commit: git commit -m 'initialize'
  • LOCAL: git remote add origin http://example.com:1234/foo/bar.git; git push -u origin master

Asks for username and password, then asks again, and again, etc. Doesn't push.

If I add myself as a "Collaborator" of the repo, then it starts working. Surely this is not necessary, because I am already an "Owner"?

Originally created by @lonix1 on GitHub (Jan 22, 2021). <!-- NOTE: If your issue is a security concern, please send an email to security@gitea.io instead of opening a public issue --> <!-- 1. Please speak English, this is the language all maintainers can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/gitea) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. Make sure it's not mentioned in the FAQ (https://docs.gitea.io/en-us/faq) 5. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> - Gitea version (or commit ref): 1.13.1 - Git version: 2.25.1 - Operating system: linux ubuntu, gitea running locally in docker <!-- Please include information on whether you built gitea yourself, used one of our downloads or are using some other package --> <!-- Please also tell us how you are running gitea, e.g. if it is being run from docker, a command-line, systemd etc. ---> <!-- If you are using a package or systemd tell us what distribution you are using --> - Database (use `[x]`): - [ ] PostgreSQL - [ ] MySQL - [ ] MSSQL - [x] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [x] No It didn't work for me, maybe it's a different version? - Log gist: <!-- It really is important to provide pertinent logs --> <!-- Please read https://docs.gitea.io/en-us/logging-configuration/#debugging-problems --> <!-- In addition, if your problem relates to git commands set `RUN_MODE=dev` at the top of app.ini --> ## Description This bug has come up many times, e.g. #5920, and seems to be resolved, but it still exists (At least for me). - GITEA: create organization - GITEA: create repo within that organization; I am now an "Owner" of that org and repo - LOCAL: create repo with lfs support: `git init; git lfs install` - LOCAL: setup lfs: `git lfs track '*.bin'; git add .gitattributes` - LOCAL: create binary file: `echo foo > foo.bin; git add foo.bin` - LOCAL: commit: `git commit -m 'initialize'` - LOCAL: `git remote add origin http://example.com:1234/foo/bar.git; git push -u origin master` Asks for username and password, then asks again, and again, etc. Doesn't push. If I add myself as a "Collaborator" of the repo, then it starts working. Surely this is not necessary, because I am already an "Owner"?
Author
Owner

@lonix1 commented on GitHub (Jan 22, 2021):

UPDATE: I'm not sure if this is a bug or not after all.

When doing git push -u origin master, it asks for username/password THREE times. Then it succeeds.

Then when I do git push, it asks for username/password TWO times. Then it succeeds.

I'm not making typos. What is the reason?

@lonix1 commented on GitHub (Jan 22, 2021): UPDATE: I'm not sure if this is a bug or not after all. When doing `git push -u origin master`, it asks for username/password THREE times. Then it succeeds. Then when I do `git push`, it asks for username/password TWO times. Then it succeeds. I'm not making typos. What is the reason?
Author
Owner

@lunny commented on GitHub (Jan 22, 2021):

Maybe because git prompt you once and git lfs prompt another ? git and git lfs don't share the secrets?

@lunny commented on GitHub (Jan 22, 2021): Maybe because `git` prompt you once and `git lfs` prompt another ? `git` and `git lfs` don't share the secrets?
Author
Owner

@lonix1 commented on GitHub (Jan 23, 2021):

@lunny That's an interesting theory, it makes sense!

I'll close, and if anyone else has this problem we can discuss. Thanks.

@lonix1 commented on GitHub (Jan 23, 2021): @lunny That's an interesting theory, it makes sense! I'll close, and if anyone else has this problem we can discuss. Thanks.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#6735