How to include ssh private rsa key when accessing git repo via ssh (gitosis)?

放肆的年华 提交于 2019-12-04 08:08:15
VonC

Windows users should be able to clone as well (with ssh), if they have defined the %HOME% environment variable.
HOME isn't defined by default.
It can reference any directory they want (usually, one takes the same than %HOMEPATH%)


The OP user685107 reports:

Problem with windows users was solved by strictly following the manual of key generation with puttygen.
new key pair maked in windows works fine

Setup git push with SSH

Generate SSH KEY with ssh-keygen

ssh-keygen -t rsa -C "your_github_email@example.com"

Github SSH connection setup

1. Copy the ssh from local machine

cat /home/ubuntu/.ssh/github_rsa.pub

2. Go to github account settings page

3. Click on New SSH Key

4. Add title and paste the copied ssh key from the local

5. Test SSH

ssh -T git@github.com

6. Update the Remote URL of the repository with the ssh url in place of https

  • Copy the ssh url from the repository

  • Copy clone with ssh URL - Clock Use SSH as in first screenshot

    git remote set-url origin git@github.com:JinnaBalu/GitCheatSheet.git

7. Test pushing with ssh

 git add --all

 git commit -am "testing the changes"

 git push -u origin master
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!