在linux服务器上生成公共秘钥
配置秘钥: git config --global user.email “you@example.com”git config --global user.name “Your Name” 如:git config --global user.email “12345679@11.com” 如:git config --global user.name “thomas” 执行命令ssh-keygen -t rsa -C your_email,如 ssh-keygen -t rsa -C “12345679@11.com”.一路回车,生成id_rsa 、id_rsa.pub两个文件。使用cat ~/.ssh/id_rsa.pub命令查看秘钥。在github-> settings-> SSH and GPG keys ->new SSH key增加秘钥。在github上创建新的 Repositories,同事在Repositories页面会有类似提示,一次在linux代码目录下执行下面目录即可 git init git add git commit -m “first commit” git branch -M master git remote add origin git@github.com:abcd / xyz.git git push -u origin master