1、首先将rsa公钥发给服务员,管理员将rsa添加到gitosis库中
2、在windows的当前用户的根目录下的.ssh目录下配置config文件,添加如下字段,下面的字段是将服务器改北京的服务器
Host ***.***.***.*** #hostIP或域名
HostName ***.***.***.*** #host的名称
User git #用户名称
Port 52882 #端口号
IdentityFile ~/.ssh/id_rsa #配置的rsa私钥文件
3、在git命令下删除远程 git remote rm origin
4、在git命令下添加远程:git remote add origin git@ ***.***.***.***:android.git
5、git push origin mster将数据上传到远程服务器上
2、在windows的当前用户的根目录下的.ssh目录下配置config文件,添加如下字段,下面的字段是将服务器改北京的服务器
Host ***.***.***.*** #hostIP或域名
HostName ***.***.***.*** #host的名称
User git #用户名称
Port 52882 #端口号
IdentityFile ~/.ssh/id_rsa #配置的rsa私钥文件
3、在git命令下删除远程 git remote rm origin
4、在git命令下添加远程:git remote add origin git@ ***.***.***.***:android.git
5、git push origin mster将数据上传到远程服务器上