go get引起的terminal prompts disabled错误

执行go get命令时,出现如下的错误提示:

fatal: could not read Username for 'https://github.com': terminal prompts disabled

两种解决方案:

  1. 先通过ssh成功登陆一次git,正确获取到key缓存。
  2. 手动添加key:https://help.github.com/articles/generating-ssh-keys/

然后就可以正常get了。

文章参考:
http://stackoverflow.com/questions/32232655/go-get-results-in-terminal-prompts-disabled-error-for-github-private-repo

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注