我正在Heroku上部署一个应用程序,我从存储库创建了一个Heroku应用程序,然后执行了
git push heroku master
。但是每次执行此操作时,都会出现以下错误:! Your key with fingerprint xxx is not authorized to access heroku-app.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
我尝试了各种方法来更改我的SSH密钥,包括删除它们并创建新的。但仍然出现相同的错误。我已将密钥添加到Heroku。
然后我尝试运行ssh -vT git@heroku.com:heroku-app.git
,结果如下:
OpenSSH_5.9p1, OpenSSL 0.9.8r 8 Feb 2011
debug1: Reading configuration data /etc/ssh_config
debug1: /etc/ssh_config line 20: Applying options for *
debug1: /etc/ssh_config line 53: Applying options for *
ssh: Could not resolve hostname heroku.com:heroku-app.git: nodename nor servname provided, or not known
我无法确定错误指向的是什么。主机名绝对有效。我是否缺少SSH配置文件中所需的内容?如果有任何想法,那就太棒了,因为我今天花了很多时间尝试让它工作,但没有成功。
git remote show origin
命令。您需要输入您的Github用户名和密码。 - Michael Durrantgit remote show
。 - Michael Durrantpwd
。 - Michael Durrantssh -T git@github.com
。 - Michael Durrant