2014-09-18 43 views
0

試圖把代碼到Heroku的服務器使用此命令Heroku的部署應用程序,並添加SSH密鑰

$ heroku login 
Enter your Heroku credentials. 
Email: [email protected] 
Password (typing will be hidden): 
Your Heroku account does not have a public ssh key uploaded. 
Could not find an existing public key at ~/.ssh/id_rsa.pub 
Would you like to generate one? [Yn] Y 
Generating new SSH public key. 
Uploading SSH public key C:/Users/USERNAME/.ssh/id_rsa.pub... done 
Authentication successful. 


$ git push heroku master 

但收到錯誤

The server's host key is not cached in the registry. You 
have no guarantee that the server is the computer you 
think it is. 
The server's rsa2 key fingerprint is: 
ssh-rsa 2048 8b:48:5e:67:0e:c9:16:47:32:f2:87:0c:1f:c8:60:ad 
Connection abandoned. 
fatal: Could not read from remote repository. 

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

左右鍵上傳,並存在,但它不會讓我推動代碼。
任何想法?

回答

0

SSH在第一次連接時會要求您確認服務器的密鑰,但git會立即給您一個錯誤。但是,在您第一次嘗試連接後,SSH將記住該服務器,即使該服務器不成功,也會記住

運行在命令行命令:

ssh heroku.com 

,你會看到一個提示是這樣的:

The authenticity of host 'heroku.com (50.19.85.132)' can't be established. 
RSA key fingerprint is 8b:48:5e:67:0e:c9:16:47:32:f2:87:0c:1f:c8:60:ad. 
Are you sure you want to continue connecting (yes/no)? 

類型 「是」。您不會連接到遠程機器 - Heroku不允許遠程登錄 - 但ssh會記住主機密鑰,您將可以使用git push