1. 程式人生 > >Pycharm程式碼上傳Github的注意事項

Pycharm程式碼上傳Github的注意事項

網上有很多帖子非常受用就不贅述了。

大家可以參考這篇:http://blog.csdn.net/ashinli/article/details/72905652

------------------------------------------------------------------------------------------------

題主只強調一下自己在看這篇文章時實際遇到的困難以及解決方案,所以最好兩篇文章結合起來看,互為補充。

可能出現的問題1.定位git.exe的位置。

如圖為原博主的路徑。但是有的人的git路徑不在這裡。

而是在C:\Users\yourName\AppData\Local\GitHub\PortableGit_f02737a78695063deace08e96d5042710d3e32db\mingw32\bin\git.exe

輸入後test一下,顯示成功。

可能出現的問題2.ssh祕鑰連結

僅僅定位了Git 的位置還不夠,題主試著post的時候報錯:

Failed to create GitHub Repository
Can't create repository: PyCharm

Unprocessable Entity - Repository creation failed.
[Repository; description]custom: description control characters are not allowed

這個時候需要配置ssh金鑰 。

在git bash 裡輸入ssh-keygen -C ‘自己郵箱@aliyun.com’ -t rsa 


會出現Your public key has been saved in /c/Users/sinitek/.ssh/id_rsa.pub.

用txt開啟,複製內容(金鑰),去自己github,在settings-ssh and GPG keys-New ssh Keys,貼上剛才複製的內容,取名隨便,儲存。

這樣的話ssh金鑰就配置好了

重新post就成功了~