git生成秘钥之后同步到服务器
现在本地生成ssh私钥和公钥
-
设置本地git用户配置
$ git config --global user.name "username"
$ git config --global user.email "user@email.com"
-
创建SSH Key,私钥和公钥
$ ssh-keygen -t rsa -C "user@email.com"
ssh-copy-id root@192.168.1.xxx /usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed /usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys root@192.168.1.xxx's password: Permission denied, please try again. root@192.168.1.xxx's password:
作者:Wicub
免责声明:文章、笔记等仅供分享、探讨、参考等学习之用,因此造成的任何后果概不负责。(如有错误、疏忽等问题,欢迎指正、讨论,谢谢)
本文版权归作者和博客园共有,欢迎转载,但请务必在文章页面明显位置给出原文连接,谢谢配合。