1

我正在和heroku一起工作。我在 git 存储库中的本地项目位于闪存驱动器 (F:) 上.

 $ git push git@heroku.com:MYPROJECT.git master
 The authenticity of host 'heroku.com (x.x.x.x)' can't be established.
 RSA key fingerprint is XXXXXXXXXX.
 Are you sure you want to continue connecting (yes/no)? yes
 Warning: Permanently added 'heroku.com,x.x.x.x' (RSA) to the list of known hosts.
 Permission denied (publickey).
 fatal: Could not read from remote repository.     

 Please make sure you have the correct access rights
 and the repository exists.

我怎样才能做到这一点?

编辑:

按照 Shireesh 的说明,我在 F: 驱动器中创建了一个具有目录结构的“配置”文件:

F:/.ssh:

id_rsa (private ) 
id_rsa (public ) 
config

配置看起来像:

Host heroku.com
User git
IdentityFile /id_rsa

当我重复推动时,我得到:

Permission denied (publickey).
fatal: Could not read from remote repository.

 Please make sure you have the correct access rights
and the repository exists.
4

1 回答 1

2

将以下行添加到$HOME/.ssh/config

Host heroku.com
   User git
   IdentityFile /path/to/your/ssh/private_key

这应该注意 ssh 密钥的位置。

于 2013-09-17T16:56:59.687 回答