gitlab创建上传本地项目到gitlab上

第一步:安装gitlab,过两天会整理一个gitlab在centos下的安装文档。
第二部:进入gitlab中,New project


image.png

第三部:写上项目名称


image.png

第四步:成功创建后,复制下来ssh


image.png

接下来就是按照Command line instructions说明来上传

第五步:右击桌面,Git Bash Here,cd .ssh下,创建密钥


image.png
image.png

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

在执行 : ssh-keygen -t rsa -C "[email protected]"
需要三次确认。确认后,会在.ssh下生成连个文件

image.png

成功后把id_rsa.pub下的密钥复制到Settings下


image.png

的ssh下


image.png

第六步:右击项目,点击Git Bash Here
执行
git config --global user.name "arlenWindow"
git config --global user.email "[email protected]"

image.png


image.png

image.png

然后参考项目下的Existing folder,执行
cd existing_folder
git init
git remote add origin git@IP:root/fwfw.git
git add .
git commit -m "Initial commit"
git push -u origin master

image.png
image.png

image.png

成功完毕

你可能感兴趣的:(gitlab创建上传本地项目到gitlab上)