git --version
git config --global user.name “wanyang03”
git config --global user.email “wanyang03@xxxshou.com”
ssh-keygen
cat ~/.ssh/id_rsa.pub | pbcopy
ssh -T git@git.corp.xxxshou.com
git clone git@git.corp.xxxshou.com:ad/ad.git
cd ad
git remote -v
首先生成ssh key,在终端中执行
ssh-keygen
直接键入三次回车。
然后把公钥内容复制,公钥的位置在~/.ssh/id_rsa.pub.
cat ~/.ssh/id_rsa.pub | clip # Windows
cat ~/.ssh/id_rsa.pub | pbcopy # MacOS
将复制的内容粘贴在https://git.corp.xxxshou.com/-/profile/keys,保存即可。
测试一下:
ssh -T git@git.corp.xxxshou.com
显示出来自己的名字即可。