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 "568987053@qq.com"

在執行 : ssh-keygen -t rsa -C "568987053@qq.com"
需要三次確認。確認后,會在.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 "568987053@qq.com"

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

成功完畢

?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。

推薦閱讀更多精彩內容