Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GitHub SSH Key claiming it is not used

Tags:

git

github

Why, under Settings => SSH keys, on my GitHub account does it say;

Added on Oct 24, 2014 by GitHub for Mac — Never used

Never used? I've used it! I've got plenty of contributions showing up on my profile. From that machine!

I have another key that says, quite rightly;

Last used within the last day.

...That one is from a different machine.

like image 354
mikelovelyuk Avatar asked Nov 23 '15 21:11

mikelovelyuk


People also ask

How do I fix my SSH key in GitHub?

In terminal enter this command with your ssh file name pbcopy < ~/. ssh/id_rsa. pub This will copy the file to your clipboard Now open you github account Go to Settings > SSH and GPG keys > New SSH key Enter title and paste the key from clipboard and save it. Voila you're done.

Why are my SSH keys not working?

Make sure the authorized_keys file and the private key itself have the correct permissions and ownership. Check that key-based authentication is allowed by the server. Make sure the private key is readable by the SSH client. If you're using PuTTY, make sure your SSH keys are properly configured for the session.

How do I fix Permission denied in GitHub?

Always use the "git" user $ ssh -T [email protected] > Permission denied (publickey). If your connection failed and you're using a remote URL with your GitHub username, you can change the remote URL to use the "git" user. You should verify your connection by typing: $ ssh -T [email protected] > Hi username!


1 Answers

Your contributions may be from that machine, but you need to check how you have set up your remotes

try the following command:

git remote -v

That will list your remotes

If it is something like

origin https://github.com/......

You are connecting over https, and not SSH

You'll need to remove that remote -

git remote rm origin

Then, on your github repository page, see the following:

enter image description here

Click the SSH link, and copy that. It should start with [email protected]

Then, add that as the remote-

git remote add origin [email protected]:.... etc

like image 89
Alex Avatar answered Oct 20 '22 12:10

Alex