gitlab创建上传本地项目到gitlab上
2018-04-23 本文已影响0人
franky_hu
第一步:安装gitlab,过两天会整理一个gitlab在centos下的安装文档。
第二部:进入gitlab中,New project

第三部:写上项目名称

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

接下来就是按照Command line instructions说明来上传
第五步:右击桌面,Git Bash Here,cd .ssh下,创建密钥


git config --global user.name "arlenWindow"
git config --global user.email "568987053@qq.com"
在执行 : ssh-keygen -t rsa -C "568987053@qq.com"
需要三次确认。确认后,会在.ssh下生成连个文件

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

的ssh下

第六步:右击项目,点击Git Bash Here
执行
git config --global user.name "arlenWindow"
git config --global user.email "568987053@qq.com"

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



成功完毕