gitlab 上传代码

#生成公钥
ssh-keygen -t ed25519 -C "[email protected]"
#拷贝公钥
pbcopy < ~/.ssh/id_ed25519.pub

在网页 user settings -> ssh keys 页面,粘贴公钥

本地端创建仓库
mkdir project
cd project
git init

#克隆远端代码
git clone ssh://[email protected]:8022/test/api_automation.git

#配置邮箱,用户名称
git config --global user.email "[email protected]"
git config --global user.name "xxx"

进入克隆下来的项目中
cd api_automation

将项目代码拷贝到该目录中,然后提交即可
git add .
git commit -am "first commit"
git push


参考:
http://gitlab.tian-wang.com/help/ssh/README#generating-a-new-ssh-key-pair

猜你喜欢

转载自www.cnblogs.com/sea-stream/p/11389324.html
今日推荐