[Code Cloud] Create a new warehouse in Code Cloud + first submission of the code base + subsequent steps to submit the code base

  1. CentOS 7 install git
安装:
yum install git

验证:
git --version
出现:
git version 1.8.3.1

Git全局配置信息:
git config --global user.name "丁大黄"
git config --global user.email [email protected]

查看配置:
git config --list
出现:
user.name=丁大黄
user.email=[email protected]
  1. Secret key configuration: locally generated private key and public key + code cloud add SSH public key + local verification
ssh-keygen -t rsa -C "[email protected]"   3次回车,生成公钥和私钥

cat ~/.ssh/id_rsa.pub  复制公钥,粘贴到码云的“设置--->SSH公钥--->添加公钥”中,取名,确认,完成公钥添加

ssh -T [email protected]   出现下面的内容说明秘钥添加成功
Hi 丁大黄! You've successfully authenticated, but GITEE.COM does not provide shell access.
  1. Initial submission
git init
git add .
git commit -m "first commit"
git remote add origin [email protected]:xxx/Study.git
git push -u origin master
  1. Subsequent submission
git add .
git commit -m "second commit"
git push -u origin master

Guess you like

Origin blog.csdn.net/qq_30885821/article/details/108610542