gitlab上传本地项目

一、登录gitlab,创建项目

二、创建密钥(win10 git bash)生成key并添加ssh key

2.1 生成id_rsa和id_rsa.pub

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

 2.2 找到C:\Users\登录用户名\.ssh 目录,里面有两个文件:id_rsa和id_rsa.pub,用文本编辑器打开id_rsa.pub

 

 

 

2.3 复制项目url

 2.4 git bash进入本地文件夹

 2.5 输入用户配置信息

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

2.6 clone工程至本地

git clone http://IP:port/mars/auto_test.git
touch README.md
git add README.md
git commit -m "add README"
git push -u origin master

2.7 提交本地代码

 git commit -m "added project DataDrivenTest"
 git add .
 git commit -m "Added DataDrivenTest"
 git push origin master



猜你喜欢

转载自www.cnblogs.com/yanux/p/12046055.html