Skip to content

BitBucket with git-lfs: HTTPs (and perhaps SSH) prompts password multiple times... and eventually succeeds... #4840

@ChameleonDevil

Description

@ChameleonDevil

Describe the bug
I don't know where to report/ask advise for BitBucket specifically. I am reporting it here, perhaps someone can assist me that also work with BitBucket and git-lfs.

A new repository that uses Large files (and git install lfs and LFS files tracked) successfully logs in on git pull before LFS files are there, but any git push -u <remote> <branch> prompts for password, and on the 4th prompt of typing the password again again the repository will start pushing the files to LFS.

I tried this after always giving up after two tries, and assuming it doesn't want to authenticate, even though the same login will work for non-lfs repositories immediately.

I would like to know why it 'ignores' the first 3 logins, and the 4th login passes?
Is there anything I need to specifically do to make git-lfs work with BitBucket?

To Reproduce
Steps to reproduce the behavior:

  1. Clone the BitBucket repository.
  2. Install lfs : git lfs install
  3. Track LFS files you want to push: git lfs track *.tar.gz
  4. git checkout -b NewBranch
  5. Add generated .gitattributes: git add .gitattributes
  6. Add LFS file: git add <file.tar.gz?>
  7. `git commit -m "Added LFS files"
  8. git push -u <remote> NewBranch
  9. Prompt for password ... fails
  10. Prompt for password ... fails
  11. Prompt for password ... fails
  12. Prompt for password ... SUCCEEDS!!

Prompts below:

Password for 'https://<x>@bitbucket.org':
Password for 'https://<x>@bitbucket.org':
Password for 'https://<x>@bitbucket.org':
Password for 'https://<x>@bitbucket.org':
Uploading LFS objects: 100% (4/4), 987 MB | 8.5 MB/s, done.

Expected behavior
A successful first login of BitBucket when using git-lfs.

System environment
The version of your operating system, plus any relevant information about platform or configuration (e.g., container or CI usage, Cygwin, WSL, or non-Basic authentication). If relevant, include the output of git config -l as a code block.

Output of git lfs env
The output of running git lfs env as a code block.

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    waitingWaiting for a response from the submitter

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions