Can't 'git push' to Heroku

I cannot git push get to Heroku in the usual way from my house. I tried using two different accounts (home and work), in different applications, with different ssh keys. This is not a damaged repo, because it works from my working computer. (Actually, I usually circumvented this with ssh -ing to work and deploy from there, but the power was gone, so I can't do it this weekend!)

Firstly, it differs from many other questions like this, primarily because I get it without errors .

Error message (not)

 $ 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. 

Please note that it hangs exactly 60 seconds before closing the connection and is displayed.

 $ 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. 

What i tried

  • heroku keys:add - the command succeeds, the keys are added to my account (show on heroku.com, and I get an email), but nothing changes.

  • Recover keys completely. Same as above.

  • Removing and re-adding git heroku using the git remote and heroku git:remote commands. (Without changes.)

  • Debugging a connection using ssh -vvv . (See below.)

Output various debug commands

 $ 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 

Additional Information

I use Arch Linux, the same ISP that I use at work (although we have a static IP address at work), and I don’t have a firewall other than the built-in router in my home (Netgear) that does not block anything. I am not for a proxy. I can deploy GitHub just fine. For some reason, I just can't even get in touch with Geroku. I know that my public keys are not rejected and that they simply do not connect in the first place, because the logs show nothing and there is no activity:

 $ heroku logs 2014-08-02T02:12:36.883623+00:00 heroku[api]: Enable Logplex by twobitalchemist@gmail.com 

Update: I opened a Heroku ticket on this issue, and I am waiting for an answer from their support. I will answer here if they can solve the problem.

+6
source share
2 answers

It looks like this could be a problem with your security certificate. Heroku does not support the ECDSA key, for its documentation . I would create a new RSA SSH key that you use for heroku, and only for heroku, send him a new public key and then configure the ssh configuration file to serve this key when SSH accesses heroku.com.

This is what I have in my ~/.ssh/config file on my laptop:

 Host heroku.com IdentityFile /Users/danielrice/.ssh/identity.heroku.danielricecodes IdentitiesOnly yes 
+6
source

Try the following:

 git@heroku.com /myherokuapp.git 

This may not be the correct URL:

 git@heroku.com :myherokuapp.git 

Alternatively, try using the https format for your remote.

 https:// git@heroku.com :myherokuapp.git 

or

 https:// git@heroku.com /myherokuapp.git 

You may not have the correct ports for the git protocol installed

Note. Common address schemes for git repositories:

 ssh:// - default port 22 git:// - default port 9418 http:// - default port 80 https:// - default port 443 

I added this because you tried to test your ssh connection, which is probably port 22. Perhaps you need to check port 9418.

Another option is to force git to use https: // instead of git: //:

 git config --global url."https://".insteadOf git:// 

or

 git config --global url."https://git.somehost.com".insteadOf git://git.somehost.com 
0
source

Source: https://habr.com/ru/post/973255/


All Articles