git版本库服务器搭建
1、linux服务器端操作
1.1linu机器git-server上创建版本库
1.2生成秘钥文件存放目录.ssh
2、安装git-bash软件生成windows端的公私钥文件
登录git-bash操作生成windows端的公私钥文件
3、windows公钥id_rsa.pub内容写入版本库机authorized_keys 文件中
给文件authorized_keys600权限
[zydrgit@git-server ~]$ chmod 600 .ssh/authorized_keys
4、登录git-bash clone代码
登录windows端git-bash 实现免秘钥clone代码www.tomcatfox.com
git clone zydrgit@192.168.1.49:www.tomcatfox.com.git

git clone zydrgit@192.168.1.49:/home/zydrgit/www.tomcatfox.com.git
5、安装putty生成.ppk文件通过TortoiseGit加载putty生成的.ppk文件实现免秘钥clone和push代码
当然也可以在windows电脑上安装putty生成.ppk文件,通过TortoiseGit 软件来加载putty生成的.ppk文件实现免秘钥clone和push代码



浙公网安备 33010602011771号