You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
git-lfs asks for a password for SSH push urls with an HTTPS fetch url #2433
When pushing with LFS data, LFS tries to communicate over the HTTPS URL, requesting a username and password. If I set it to prefixpriv:, everything works fine (GitLab mentions something about passing the credentials over from SSH to the HTTPS communication). When pushing, git-lfs should query using git remote get-url --push $remote and when pulling it should query with git remote get-url $remote. The --push option was added in git-2.7.0 if it needs a version comparison attached to it.
Maybe. My instead of is being used properly though (nothing would work otherwise). Maybe it's a problem with LFS only asking if it doesn't "look" like a valid URL?
Looking around, I'm not sure why git-lfs is trying to decipher the config file itself rather than just asking git what's going on, but I suspect that adding tests to ensure that git-lfs gets the same answers as git in these kinds of cases would help a lot.
@bitclaw remove the url/insteadof stuff from your config, and you should be good to go. It's not a great workaround, but this isn't a high priority issue for us right now. It may be a good thing for a new contributor to work on though.
It could work, but LFS already requires at least 2 git commands to run: git version and git config. That's why I prefer PRs like #2715, as extra os/exec calls tend to sneak up on you if you're not careful.
Course, there is something to be said to relying on Git when it can give us a simple answer, like git remote get-url. An alternative solution may be to use that command, and add assertions to tests for the number of exec calls in a Git LFS command.
@mathstuf Thanks for the reminder of that command. I should at least use it in tests to make sure PRs like #2715 are implemented correctly.
I can see a performance argument, but asking Git what it thinks is also going to always match what Git is thinking. If another way to handle remote URL rewriting were added, it would work as expected with any given Git version rather than having to be reimplemented here. But, I'm not a maintainer here (nor do I know Go well enough to contribute much), so it's not something I can make happen either way right now.
Activity
ttaylorr commentedon Jul 24, 2017
Thanks @mathstuf, this definitely seems like a bug to me.
larsxschneider commentedon Jul 25, 2017
Maybe somewhat related to #2298?
mathstuf commentedon Jul 25, 2017
Maybe. My instead of is being used properly though (nothing would work otherwise). Maybe it's a problem with LFS only asking if it doesn't "look" like a valid URL?
mathstuf commentedon Jul 25, 2017
Looking around, I'm not sure why git-lfs is trying to decipher the config file itself rather than just asking git what's going on, but I suspect that adding tests to ensure that git-lfs gets the same answers as git in these kinds of cases would help a lot.
V1460kw commentedon Jul 31, 2017
Почему мне надо обратиться в системму
bitclaw commentedon Nov 12, 2017
Same here:
git push origin master Git LFS: (1153 of 22329 files, 9667 skipped) 854.14 MB / 5.08 GB, 610.20 MB skipped Username for 'https://bitbucket.org':When I enter password after a while it asks for it again.
technoweenie commentedon Nov 13, 2017
@bitclaw remove the url/insteadof stuff from your config, and you should be good to go. It's not a great workaround, but this isn't a high priority issue for us right now. It may be a good thing for a new contributor to work on though.
mathstuf commentedon Nov 13, 2017
Would using
git remote get-urlbe acceptable or isgit-lfsgoing to have to learn how to do that replacement on its own as well?technoweenie commentedon Nov 13, 2017
It could work, but LFS already requires at least 2 git commands to run:
git versionandgit config. That's why I prefer PRs like #2715, as extra os/exec calls tend to sneak up on you if you're not careful.Course, there is something to be said to relying on Git when it can give us a simple answer, like
git remote get-url. An alternative solution may be to use that command, and add assertions to tests for the number of exec calls in a Git LFS command.@mathstuf Thanks for the reminder of that command. I should at least use it in tests to make sure PRs like #2715 are implemented correctly.
mathstuf commentedon Nov 14, 2017
I can see a performance argument, but asking Git what it thinks is also going to always match what Git is thinking. If another way to handle remote URL rewriting were added, it would work as expected with any given Git version rather than having to be reimplemented here. But, I'm not a maintainer here (nor do I know Go well enough to contribute much), so it's not something I can make happen either way right now.