I can't get pass this, have remade the repository multiple times, made ssh keys over
--------------
demo_app <username>$ git remote add origin [email protected]:<username>/demo_app.git
fatal: remote origin already exists.
$ git push -u origin master
---
ssh: Could not resolve hostname git: nodename nor servname provided, or not known
---
fatal: Could not read from remote repository.
---
Please make sure you have the correct access rights
---
and the repository exists.
----------
---------
Checked ssh keys
---
$ ssh -T [email protected]
Hi <username>! You've successfully authenticated, but GitHub does not provide shell access.
---
Still receiving the same message.
This error indicates that your hostname failed to translate into an IP address. Usually, this error occurs when you change the hostname of your system. Please check the details in the Address field as entered by you. Also, check if the hostname of your FTP server and IP address is correct.
In some cases, you're going to inevitably come across errors. And one such error is the “So Such Host is Known” error. As and when you get such error, it implies that either the server is down or the hostname is incorrect and hence SSH wasn't able to connect to it.
If you're not already on the "Site admin" page, in the upper-left corner, click Site admin. In the left sidebar, click Management Console. In the left sidebar, click Hostname.
Instead of adding a new remote, try to change the existing one with the following command:
git remote set-url origin [email protected]:<username>/demo_app.git
Edit: so, here are the commands to make it work without losing your code.
rm -rf .git
git init .
git remote add origin [email protected]:<username>/demo_app.git
git commit --allow-empty -m 'First commit'
git push origin master
Try:
ssh -T -p 443 [email protected]
If that works then you can add settings to your ~/.ssh/config
to always connect through 443
:
Host github.com
Hostname ssh.github.com
Port 443
More info here: https://help.github.com/articles/using-ssh-over-the-https-port/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With