Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Every time I restart my computer I have to ssh-add my ssh key. I already have ssh key added on github. Does anyone know how to fix it? Thanks.

share|improve this question

migrated from stackoverflow.com Nov 7 '12 at 7:22

This question came from our site for professional and enthusiast programmers.

add comment

1 Answer

You could create an alias in your ssh config. For example:

    Host example.github.com
            HostName github.com
            IdentityFile ~/.ssh/id_rsa_example 

Make sure your git remote references the ssh alias "example.github.com". The "IdentityFile" directive should point to the path where you plan on storing your private key. This tells ssh which key to associate with the alias.

share|improve this answer
    
is there an example for that? I am fairly new to github. I don't even know where to find the ssh config. Ty for your reply. –  winston kyu Nov 6 '12 at 23:23
    
By default only the global config exists. Generally people create a user ssh config in their home directory like "~/.ssh/config". Here are several example configs. debuntu.org/how-to-customize-ssh-client –  Ziaunys Nov 7 '12 at 1:26
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.