將mac上的項目上傳到oschina,進行代碼託管。

來源:互聯網
上載者:User

標籤:name   ssh公開金鑰   code   nbsp   regex   class   --   bash   返回   

1.首先看一下自己是否有公開金鑰, 在 我的資料-->SSH公開金鑰  查看,如果沒有,添加自己的SSH 公開金鑰:

   SSH key 可以讓你在你的電腦和 Git @ OSC 之間建立安全的加密串連。

2.如果沒有公開金鑰。你可以按如下命令來產生sshkey    $   ssh-keygen -t rsa -C "[email protected]xxxxx.com"

  如果有公開金鑰。查看你的public key   $  cat ~/.ssh/id_rsa.pub

  然後再添加公陰到oschina上面,添加後,在終端(Terminal)中輸入 $ ssh -T [email protected]  

  若返回    Welcome to [email protected], yourname!    則證明添加成功。

3.將目錄切換到你的項目所在的檔案夾,例如你有一個項目Demo,你就切換到.../Demo目錄下

4.運行命令 git init .   注意後面有一個點

5.運行命令 git pull [email protected]:xxxx/Demo.git 

6.運行命令  git add -A .  注意後面有一個點

7.運行命令  git commit -am "對代碼的有關說明"

8.運行命令   git push [email protected]:xxxxxxx/Demo.git   master

最後出現進度,上傳速度,done,證明上傳成功。


 

  

將mac上的項目上傳到oschina,進行代碼託管。

聯繫我們

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