码云的脚本配置Mac版

1. 生成公钥

ssh-keygen -t rsa -C "[email protected]"  

注意:在选择文件存储路径时,直接回车,保存在默认路径下

2..查看public key

cat ~/.ssh/id_rsa.pub

3.将公钥添加到码云SSH公钥页面(https://gitee.com/profile/sshkeys),然后测试连接

ssh -T [email protected]

4.配置 git

git config --global user.name "John Smith"
git config --global user.email [email protected]

5.进入目标文件夹,克隆仓库

cd Documents/workingspace/
git clone [email protected]:hotoneaudio/test.git

6.提交

git add .
git commit -m '初始化项目'
git push origin master

猜你喜欢

转载自www.cnblogs.com/PJXWang/p/10305719.html