IDEA上的項目托管到碼雲步驟:
1、安裝Git
2、idea上配置Git
Setting-Version Control-Git
把git.exe改為安裝的Git的執行路徑如:D:\Program Files\Git\cmd\git.exe
點擊Test,Successful即可
3、idea安裝gitee
啟動 idea進入首頁
選擇 Configure - Plugins
選擇 Browse repositories...
搜索 gitee,安裝插件
重啟 idea 即可
4、登錄到碼雲
Setting-Version Control-Gitee
如果Auth Type為灰色不能點擊,那么就不能用Password登錄了,點擊Create API Token,彈框后輸入用戶名密碼登錄,就會創建一個Token了
如果Auth Type能點擊可以選擇Password登錄
5、把項目托管到碼雲
VCS-Import into Version Control-Share Project on Gitee
然后操作就行了
應該會出現這個錯誤:
Can't finish GitHub sharing process
Successfully created project 'Demo' on GitHub, but initial commit failed:...
解決:
找到git安裝目錄下的Git Bash運行后輸入下面兩行代碼(郵箱、用戶名改為自己的)即可:
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
然后再次做提交操作就行了
6、打開碼雲上的項目,可能沒有提交的代碼,按照界面提示操作就行了
原文也是我的:https://blog.csdn.net/j11j11/article/details/84563045