Skip to content

Instantly share code, notes, and snippets.

@stanlee321
Last active April 29, 2020 15:22
Show Gist options
  • Save stanlee321/366735dd1327799bce3e0d2e89bd974b to your computer and use it in GitHub Desktop.
Save stanlee321/366735dd1327799bce3e0d2e89bd974b to your computer and use it in GitHub Desktop.
ssh github
eval `ssh-agent -s`; ssh-add your_key; git push
# FOR PERMAMENT
A solution would be to force the key files to be kept permanently, by adding them in your ~/.ssh/config file:
IdentityFile ~/.ssh/gitHubKey
IdentityFile ~/.ssh/id_rsa_buhlServer
If you do not have a 'config' file in the ~/.ssh directory, then you should create one. It does not need root rights, so simply:
nano ~/.ssh/config
...and enter the lines above as per your requirements.
For this to work the file needs to have chmod 600.
You can use the command chmod 600 ~/.ssh/config.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment