【问题标题】:Why is Git not prompting me for password?为什么 Git 不提示我输入密码?
【发布时间】:2014-04-04 03:02:00
【问题描述】:

我正在尝试设置一个 Git/Bitbucket 帐户,以便我可以对我的一个项目进行源代码控制。我创建了一个 Bitbucket 帐户,并为自己创建了一个存储库。

我在 Atlassian 文档中Clone Your Git Repo and Add Source Files 的第 1 部分第 8 部分。

我不断收到此错误:

 fatal: could not read Password for 'https://newuserme@bitbucket.org': No such file or directory

所以我运行了命令

git config --global core.askpass

然后再试一次,还是没有提示输入密码。我在这里想念什么? (注意:我使用的是实际存储库中的克隆链接,而不是此处显示的链接。:))

【问题讨论】:

  • 你用的是什么操作系统

标签: git bitbucket


【解决方案1】:

代替git config --global core.askpass,你可以试试:

git config --global core.askpass /usr/libexec/git-core/git-gui--askpass

(如GitExtensions issue 85 中的评论)

请注意,您还可以使用凭证助手来缓存您的密码:例如“How to configure GIT on Windows 7 to push project to Google Code”。

【讨论】:

    【解决方案2】:

    在 Windows 上这对我有用:

    git config --global credential.helper wincred

    【讨论】:

      猜你喜欢
      • 2011-12-08
      • 2018-07-18
      • 2017-07-26
      • 2013-07-04
      • 1970-01-01
      • 1970-01-01
      • 2010-11-24
      相关资源
      最近更新 更多