git使用碼雲

來源:互聯網
上載者:User

標籤:push   gen   code   返回   安全   公開金鑰   準備工作   tps   輸入   

一、git配合使用碼雲,在https://gitee.com碼雲上註冊並建立項目。

 

並在本地安裝git安裝地址https://git-scm.com/download並配置自己的使用者名稱和郵箱。

git config --global user.name "Your Name"
git config --global user.email "[email protected]"
可用git config --list 查看配置資訊

二、準備工作做完以後就需要配置SSH公開金鑰。在碼雲設定->安全設定中找到SSH公開金鑰。

 

在本地git輸入ssh-keygen -t rsa -C "[email protected]" 註:[email protected]就是剛才你配置的郵箱。按照提示完成三次斷行符號,即可產生 ssh key。用cat ~/.ssh/id_rsa.pub命令查看。把公開金鑰複製出來。填入到碼雲SSH公開金鑰裡面就完成。碼雲產生SSH文檔地址https://gitee.com/help/articles/4181

三、添加後,在本地git中輸入ssh -T [email protected]返回Hi XXX! You‘ve successfully authenticated, but Gitee.com does not provide shell access.則表示已經配置成功。

 

四、配置成功後先把遠程項目拉取到本地。git clone [email protected]:zyf91360/zyfbk.git。註:這樣好像本地直接就和遠程關聯了不需要用git remote add origin git@gitee.com::zyf91360/zyfbk.git關聯了。如果無法push成功的可以關聯一下。也可以先用git remote -v查看遠程庫資訊

 

如下則表示有拉取推送的許可權。

 

git使用碼雲

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.