如何使用PuTTY克隆heroku git存储库

时间:2018-10-18 16:14:31

标签: git heroku putty

我要做什么?

我正在尝试使用PuTTY克隆我的heroku git存储库:

git clone https://git.heroku.com/projectname.git

出了什么问题?

当我克隆heroku存储库时,系统会提示您输入用户名和密码,就像heroku doc在here中所说的那样(忽略用户名并输入您的帐户API密钥作为密码)。但这给了我这个错误:

remote: ! WARNING:
remote: ! Do not authenticate with username and password using git.
remote: ! Run `heroku login` to update your credentials, then retry the git command.
remote: ! See documentation for details: 
fatal: Authentication failed for 'https://git.heroku.com/projectname.git/'

我还尝试在heroku中生成SSH密钥,并提供该密钥作为密码,但是仍然出现相同的错误。

这对我来说是全新的,所以我很难受。

任何帮助将不胜感激。

1 个答案:

答案 0 :(得分:0)

Heroku在CLI中内置了此功能。您可以简单地使用heroku git:clone,它将自动使用.netrc中的凭据。