我不能git push以正常的方式从我家到Heroku.我尝试在不同的应用程序上使用两个不同的帐户(家庭和工作),使用不同的ssh密钥.这不是一个损坏的回购,因为它可以在我的工作计算机上运行.(事实上,我通常会通过ssh工作和从那里进行部署来解决这个问题,但是那里的力量已经消失了,所以本周末我不能这样做!)
首先,这与其他几十个类似的问题不同,主要是因为我没有收到任何错误.
$ git push heroku master
Connection closed by 50.19.85.132
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Run Code Online (Sandbox Code Playgroud)
请注意,它会在连接关闭之前正好挂起60秒,并显示此信息.
$ git push -v heroku master
Pushing to git@heroku.com:myherokuapp.git
Connection closed by 50.19.85.154
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Run Code Online (Sandbox Code Playgroud)
heroku keys:add - 命令成功,密钥被添加到我的帐户(在heroku.com上显示,我收到电子邮件),但没有任何变化.
完全重新生成密钥.与上述相同.
heroku使用git remote和heroku git:remote命令删除并重新添加git repo .(没变.)
使用调试连接ssh -vvv.(见下文.)
$ git remote -v
heroku git@heroku.com:myherokuapp.git (fetch)
heroku git@heroku.com:myherokuapp.git (push)
$ heroku apps:info
=== myherokuapp
Git URL: git@heroku.com:myherokuapp.git
Owner Email: twobitalchemist@gmail.com
Region: us
Stack: cedar
Web URL: http://myherokuapp.herokuapp.com/
$ ping -c4 50.19.85.132
PING 50.19.85.132 (50.19.85.132) 56(84) bytes of data.
64 bytes from 50.19.85.132: icmp_seq=1 ttl=37 time=48.9 ms
64 bytes from 50.19.85.132: icmp_seq=2 ttl=37 time=49.1 ms
64 bytes from 50.19.85.132: icmp_seq=3 ttl=37 time=47.9 ms
64 bytes from 50.19.85.132: icmp_seq=4 ttl=37 time=49.2 ms
--- 50.19.85.132 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3004ms
rtt min/avg/max/mdev = 47.997/48.832/49.245/0.498 ms
$ ping -c4 50.19.85.154
PING 50.19.85.154 (50.19.85.154) 56(84) bytes of data.
64 bytes from 50.19.85.154: icmp_seq=1 ttl=41 time=47.8 ms
64 bytes from 50.19.85.154: icmp_seq=2 ttl=41 time=47.7 ms
64 bytes from 50.19.85.154: icmp_seq=3 ttl=41 time=49.7 ms
64 bytes from 50.19.85.154: icmp_seq=4 ttl=41 time=50.0 ms
--- 50.19.85.154 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3005ms
rtt min/avg/max/mdev = 47.746/48.855/50.055/1.059 ms
$ ssh -vvv git@heroku.com
OpenSSH_6.6.1, OpenSSL 1.0.1h 5 Jun 2014
debug1: Reading configuration data /home/user/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug2: ssh_connect: needpriv 0
debug1: Connecting to heroku.com [50.19.85.132] port 22.
debug1: Connection established.
[ several lines ommitted ]
debug1: Offering ECDSA public key: /home/user/.ssh/id_ecdsa
debug3: send_pubkey_test
debug2: we sent a publickey packet, wait for reply
[ hangs here ]
Connection closed by 50.19.85.132
Run Code Online (Sandbox Code Playgroud)
我在工作中使用的同一个ISP上使用Arch Linux(虽然在工作中我们有一个静态IP),除了内置于我家(Netgear)路由器的内容之外我没有防火墙,它设置为不阻止任何东西.我不是代理人.我可以从这里部署到GitHub就好了.无论出于何种原因,我甚至无法与Heroku建立联系.我知道我的公钥没有被拒绝,并且它首先没有连接,因为日志没有显示任何内容并且没有活动:
$ heroku logs
2014-08-02T02:12:36.883623+00:00 heroku[api]: Enable Logplex by twobitalchemist@gmail.com
Run Code Online (Sandbox Code Playgroud)
更新:我已经就此问题开了一张Heroku门票,正等待他们的支持回复.如果他们能够解决问题,我会在这里回答.
看起来这可能是您的安全证书的问题.Heroku 根据他们的文档不支持ECDSA密钥.我将创建一个用于heroku的新RSA SSH密钥,仅用于heroku,将新公钥发送给他们,然后设置一个ssh配置文件,以便在SSH到达heroku.com时提供该密钥.
这就是我在~/.ssh/config笔记本电脑上的文件中所拥有的内容:
Host heroku.com
IdentityFile /Users/danielrice/.ssh/identity.heroku.danielricecodes
IdentitiesOnly yes
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2174 次 |
| 最近记录: |