All of lore.kernel.org
 help / color / mirror / Atom feed
* Git 2.7.2.windows.1 fails to authenticate access to private repository over HTTPS
@ 2016-02-29  3:24 zacr
  2016-02-29 13:30 ` Johannes Schindelin
  0 siblings, 1 reply; 2+ messages in thread
From: zacr @ 2016-02-29  3:24 UTC (permalink / raw)
  To: git

Hi,

I have recently downloaded 64-bit Git for Windows (the file I downloaded 
was "Git-2.7.2-64-bit.exe"). This reports a version string of "git 
version 2.7.2.windows.1"
Using it from the command line, after cloning a repository, I attempted 
to "git pull" a private repository from GitHub. From prior experience, I 
expected it to ask me for my username and password, then authenticate 
with the server. It asked for my username, which I typed in, but after 
pressing Enter it suddenly failed with an error:

error: failed to execute prompt script (exit code 1)
fatal: could not read Username for 'https://github.com': Invalid 
argument


I experimented a bit, and it only occurs when trying to use HTTPS to 
pull from a repository that requires authentication. Using a personal 
access token to authenticate or using the git protocol both work.

I ran it again with GIT_TRACE=true, and here is the trace (with username 
and repository name removed):

15:55:58.615147 git.c:348               trace: built-in: git 'pull'
15:55:58.617147 run-command.c:343       trace: run_command: 'fetch' 
'--update-head-ok'
15:55:58.633149 git.c:348               trace: built-in: git 'fetch' 
'--update-head-ok'
15:55:58.636149 run-command.c:343       trace: run_command: 
'git-remote-https' 'origin' 'https://github.com/username/repository.git'
15:55:59.630248 run-command.c:343       trace: run_command: 'bash' '-c' 
'cat >/dev/tty && read -r line </dev/tty && echo "$line"'
error: failed to execute prompt script (exit code 1)
fatal: could not read Username for 'https://github.com': Invalid 
argument


It looks like it's trying to run a new bash instance for me to enter my 
password, which fails on Windows because I don't have bash installed.



For reference, here are some old threads I found while researching the 
issue. It looks like this has cropped up before, in Git 1.8.5.
https://groups.google.com/forum/#!msg/msysgit/s4dB8Nv9V4c/55-cGPdPYmAJ
https://github.com/msysgit/msysgit/issues/153
and stackoverflow for good measure (comments by Mr_and_Mrs_D, Ricardo, 
and AndyL identify it as a bug with 1.8.5):
http://stackoverflow.com/questions/20871549/error-when-push-commits-with-github-fatal-could-not-read-username


I would appreciate your help.


Yours sincerely,
Zac Roberts
zacr@slingshot.co.nz

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-02-29 13:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-29  3:24 Git 2.7.2.windows.1 fails to authenticate access to private repository over HTTPS zacr
2016-02-29 13:30 ` Johannes Schindelin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.