github入門之上傳本地項目——筆記

來源:互聯網
上載者:User

標籤:git push   idt   code   rsa   出錯   本地庫   公開金鑰   添加   git   

1. 建立一個遠程庫repository

可以看到建立代碼:

  git init //把這個目錄變成Git可以管理的倉庫  git add README.md //檔案添加到倉庫  git add . //不但可以跟單一檔案,還可以跟萬用字元,更可以跟目錄。一個點就把目前的目錄下所有未追蹤的檔案全部add了   git commit -m "first commit" //把檔案提交到倉庫  git remote add origin [email protected]:wangjiax9/practice.git //關聯遠程倉庫  git push -u origin master //把本地庫的所有內容推送到遠程庫上

2. 設定帳號ssh key

若沒有這三個檔案,則要先輸入

  $ ssh-keygen -t rsa -C “[email protected]163[email protected]163.com” //ssh與-keygen之間沒有空格,否則會出現Bad escape character ‘ygen‘錯誤

將得到的id_rsa.pub公開金鑰添加到遠程庫中

註:若出現permission denied錯誤可能就是ssh出錯

3. 通過上述命令列操作把本地項目上傳

參考文章:http://www.cnblogs.com/specter45/p/github.html

github入門之上傳本地項目——筆記

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.