SSH Git without having to type in my password every time [duplicate]

大憨熊 提交于 2019-12-11 04:46:01

问题


I have a git repo set up on my website which can be accessed by ssh, but every time I push some files to the repo I have to type in my password again. Is there a way in which I only have to type my password in once?


回答1:


Yes, you have to put your SSH public key on your server, in the ~/.ssh/authorized_keys file.

You can find your public key on your local machine, in the ~/.ssh/id_rsa.pub file (supposing you are on a Unix system, I don't know the location of this key on Windows).




回答2:


You should look into ssh keys.

Some instructions:

http://pkeck.myweb.uga.edu/ssh/

http://oreilly.com/pub/h/66



来源:https://stackoverflow.com/questions/6034894/ssh-git-without-having-to-type-in-my-password-every-time

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