$ heroku keys=== 1 key for joe@example.comssh-dss AAAAB8NzaC...DVj3R4Ww== joe@workstation.local
2)构建一个~/. ssh/config文件:
$ sudo vim ~/.ssh/config
使用此信息进行编辑
Host heroku.comHostname heroku.comPort 22IdentitiesOnly yesIdentityFile ~/.ssh/ssh-dss # location and name of your private keyTCPKeepAlive yesUser joe@workstation.local
heroku keys:remove //removes the existing keyssh-keygen -t rsa //generates a new key in ~/.ssh folderheroku keys:add //uploads the new key, if no arguments r passed then the key generated//in default directroy i.e., ~/.ssh/id_rsa is uploadedgit push heroku
上面的命令要求我生成一个新的密钥,下面是输出找不到现有的公钥。你想生成一个吗?[Yn]Y生成新的SSH公钥。上传SSH公钥C:/Documents and Setings/Admin/. ssh/id_rsa.pub.!'heroku'宝石已被弃用并替换为Heroku工具包,从https://toolbelt.heroku.com下载并安装。
重新运行命令heroku键:添加
上面的命令不会给出以下输出找到现有公钥:C:/Documents and Setings/Admin/. ssh/id_rsa.pub上传SSH公钥C:/Documents and Setings/Admin/. ssh/id_rsa.pub.
heroku keys:clear //removes existing keysssh-keygen -t rsa //generates a new key in ~/.ssh folder (set a password)heroku keys:add //uploads the new key, ~/.ssh/id_rsa is uploadedgit push heroku production:master