文章目錄
- 注冊
- 配置公鑰
- 創建空白的碼云倉庫
- 把本地項目上傳到碼云對應的空白倉庫中
注冊
注冊并激活碼云賬號( 注冊頁面地址:https://gitee.com/signup )
可以在自己C盤/用戶/用戶名/.ssh 可以看到 有id_rsa.pub 以前在GitHub注冊時搞過,打開id_rsa.pub復制
配置公鑰
生成并配置 SSH 公鑰
- 將id_rsa.pub的內容復制到 下面頁面的公鑰中,會自動生成標題,然后點擊確定
- 然后點擊確定 彈出驗證身份,是你注冊時的密碼
PS D:\筆記之前端\筆記之項目\微信小程序\筆記\code\項目\project_shop\uni-shop-2> ssh -t git@gitee.comThe authenticity of host 'gitee.com (180.76.198.77)' can't be established.ECDSA key fingerprint is SHA256:FQGC9Kn/eye1W8icdBgrQp+KkGYoFgbVr17bmjey0Wc.Are you sure you want to continue connecting (yes/no/[fingerprint])? yes // 這里輸入yesWarning: Permanently added 'gitee.com,180.76.198.77' (ECDSA) to the list of known hosts.Hi xrkhy(@xrkhy)! You've successfully authenticated, but GITEE.COM does not provide shell access.Connection to gitee.com closed. // 這里successfully代表成功
創建空白的碼云倉庫
- 創建空白的碼云倉庫
- 寫項目名字以及選中公開 去創建
把本地項目上傳到碼云對應的空白倉庫中
選中SSH模式 然后在項目根目錄執行 2 3 行命令
右擊項目根目錄 -->在外部資源管理器打開–>shift+右擊–>powershell窗口
PS D:\...項目\project_shop\uni-shop-2> git initPS D:\...\項目\project_shop\uni-shop-2> git remote add origin git@gitee.com:xrkhy/uni-shop2.gitgit add .git commit -m "首次提交無畏契約項目"git push -u origin masterPS D:\...\項目\project_shop\uni-shop-2> git push -u origin master
Enumerating objects: 490, done.
Counting objects: 100% (490/490), done.
Delta compression using up to 16 threads
Compressing objects: 100% (407/407), done.
Writing objects: 100% (490/490), 336.54 KiB | 1.04 MiB/s, done.
Total 490 (delta 91), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (91/91), done.
remote: Powered by GITEE.COM [GNK-6.4]
To gitee.com:xrkhy/uni-shop2.git* [new branch] master -> master
Branch 'master' set up to track remote branch 'master' from 'origin'.