Xcode github ssh key no longer works

Hi Guys,

I commit and push via Xcode to my github account everyday with a ssh key and it worked just fine till this morning! I had a mail by github, yesterday, username and password is deprecated please refer to developer guide.
I have generated a new key via terminal, and assigned it to ssh agent, register on xcode… still doesn’t work!
as a response from Xcode :
failed to connect to github.com: Connection refused (-1)
as a response from terminal:

ssh: connect to host github.com port 22: Connection refused

fatal: Could not read from remote repository.

Please make sure you have the correct access rights

and the repository exists.

I don’t see how I can do ! Can someone help me?

Thanks a lot guys

Hey @marianneji :wave:

How are you going? Thanks so much for your post!

The Connection refused message typically suggests that port 22 is being blocked on your network, somehow.

Though I would start by verifying that the key you’re using is still valid (not expired) and has permission to connect to the repository you’re trying to work with. You can also use this utility:

…to help test your connection.

If you see anything confusing in your debug tests, please feel free to post-back. However, be very mindful of what you choose to include, and please obscure any sensitive information that might be exposed.

Let us know how you do!

Hey @nethgato,

Thank you so much for your response. You were right, I’m using my laptop at my new work and the network is restricted… That’s why I couldn’t commit and push my repo. I have generated a new Key, and I use my Iphone to push on github with the terminal.

Thanks again, that was really helpful :wink:

1 Like