New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Non-interactive installation prompts for git password #1009
Comments
git sometimes blocks asking for a password. On a random machine that didn't know anything about google/chromium, it failed immediately with "fatal: could not read Username for 'https://chrome-internal.googlesource.com': No such file or directory" but on my real machine w/o _netrc it blocks and wants this: Username for 'https://chrome-internal.googlesource.com': Password for 'https://chrome-internal.googlesource.com': There's no --non-interactive unfortunately, it's supposed to magically decide if it's connected to a tty and behave appropriately. It does not, perhaps because of being wrapped in depot_tools .bat files, perhaps an msysgit-port bug, perhaps being called from python. Anyway bower/bower#1009 had a magic incantation that works for this case: 'true' is available in the msys distribution. R=iannucci@chromium.org BUG=323300 Review URL: https://codereview.chromium.org/182553004 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@253844 0039d316-1c4b-4281-b951-d872f2087c98
Scheduling on next release. Do you want to send a PR? It should be fairly easy to implement. |
Fixes potential "Username for 'https://github.com': " interactive prompts for private repos. Thank you @pornel for the solution from bower/bower#1009. It took me half an hour to find a working solution for this problem, which is odd given that ls-remote is supposed to be a low-level plumbing command to be used primarily by scripts. :/
git sometimes blocks asking for a password. On a random machine that didn't know anything about google/chromium, it failed immediately with "fatal: could not read Username for 'https://chrome-internal.googlesource.com': No such file or directory" but on my real machine w/o _netrc it blocks and wants this: Username for 'https://chrome-internal.googlesource.com': Password for 'https://chrome-internal.googlesource.com': There's no --non-interactive unfortunately, it's supposed to magically decide if it's connected to a tty and behave appropriately. It does not, perhaps because of being wrapped in depot_tools .bat files, perhaps an msysgit-port bug, perhaps being called from python. Anyway bower/bower#1009 had a magic incantation that works for this case: 'true' is available in the msys distribution. R=iannucci@chromium.org BUG=323300 Review URL: https://codereview.chromium.org/182553004 git-svn-id: http://src.chromium.org/chrome/trunk/tools/depot_tools@253844 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
I think |
@sheerun, according to commit message of svn2github/chromium-depot-tools@cc130b9:
|
Bower also supports non-msys installation |
Well, another way, if git version 2.3 or later is used, is to use |
Maybe we can do both, with platform detection :) |
Fixes potential "Username for 'https://github.com': " interactive prompts for private repos. Thank you @pornel for the solution from bower/bower#1009. It took me half an hour to find a working solution for this problem, which is odd given that ls-remote is supposed to be a low-level plumbing command to be used primarily by scripts. :/
The
git
child process can show its own interactive prompt at any time (e.g. git interprets 404 on github as authentication error and wants to retry with a password).To prevent this you can run
git
with:true
here is not a boolean value, but a command/bin/true
that will make git think it asked for a password.The text was updated successfully, but these errors were encountered: