windows想访问远端git仓库 & linux想访问远端git仓库

1.访问远端仓库的原理
  需要将我们 windows本地的公钥 放到那个物理机上的里面
2.本地公钥地址

 


 3.git仓库

/root/.ssh/authorized_keys

 

 

2.linux同理,但是如果没有对应的公钥文件怎么办呢

# git安装以后如何生成公钥私钥
ssh-keygen
#然后在/root/.ssh   会有4个文件authorized_keys  id_rsa  id_rsa.pub  known_hosts


# 然后复制公钥去对面的机子/home/git/.ssh/authorized_keys

 

posted @ 2022-09-15 15:14    阅读(20)  评论(0编辑  收藏  举报