網(wǎng)站首頁 編程語言 正文
Gitee:使用ssh提交代碼卻提示:DeployKey does not support push code fatal: Could not read from remote repository
作者:Trine_cui 更新時間: 2022-07-21 編程語言文章目錄
錯誤描述
錯誤原因:沒有注冊ssh公鑰
解決辦法:
1、生成對應本地倉庫的ssh公鑰
2、獲取對應本地倉庫的ssh公鑰值
3、將得到的ssh公鑰復制,將其添加到我們的遠程倉庫gitee的SSH公鑰上去
再來從本地倉庫向遠程倉庫傳值
錯誤描述
用Git從本地倉庫上傳服務器倉庫報錯:DeployKey does not support push code
??
??錯誤代碼:(通過$ git push origin master命令從本地倉庫上傳到服務器倉庫)
$ git push origin master
Access deined: DeployKey does not support push code
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
錯誤原因:沒有注冊ssh公鑰
解決辦法:
添加ssh公鑰:
- 生成對應本地倉庫的ssh公鑰
1.1 選擇你要上傳代碼的文件夾鼠標右鍵打開Git Bash Here
??找到碼云的倉庫,復制SSH的地址值
1.2 **輸入命令`ssh-keygen -t rsa -C` “ssh地址值”來生成對應本地數(shù)據(jù)的ssh的key值**,然后回車,遇到(Y/N)輸入Y,其它回車就行
2. 獲取對應本地倉庫的ssh公鑰值
輸入cat ~/.ssh/id_rsa.pub命令獲取ssh的key值
3. 將得到的ssh公鑰復制,將其添加到我們的遠程倉庫gitee的SSH公鑰上去
??3.1 進入碼云(gitee),將鼠標放入頭像上,進入設置
??
3.2 點開SSH公鑰,將我們獲取的公鑰字符串copy進去,按確定
?3.3 增加SSH公鑰成功
?
再來從本地倉庫向遠程倉庫傳值
1、輸入git push origin master 指令,發(fā)現(xiàn)上傳遠程倉庫成功
2、訪問碼云遠程倉庫,發(fā)現(xiàn)數(shù)據(jù)已經(jīng)上傳成功了
git config --global user.name "Trine"
git config --global user.email "2792007912@qq.com"
git init
git add .
git commit -m '提交的名字,方便查找'
git remote add origin SSH值
git push
git pull
原文鏈接:https://blog.csdn.net/weixin_46253682/article/details/125897811
相關推薦
- 2022-06-08 ASP.NET?Core使用IHttpClientFactory發(fā)出HTTP請求_基礎應用
- 2022-07-21 數(shù)據(jù)庫表數(shù)據(jù)操作-新增、刪除、修改
- 2022-04-10 微信小程序canvas drawImage 圖片展示的方法
- 2023-02-06 Python實現(xiàn)號碼歸屬地查詢功能_python
- 2022-12-04 Python?棧實現(xiàn)的幾種方式及優(yōu)劣詳解_python
- 2023-05-06 Python正則表達式中group與groups的用法詳解_python
- 2022-08-27 Qt實現(xiàn)一個簡單的word文檔編輯器_C 語言
- 2022-11-13 Python?fileinput模塊應用詳解_python
- 最近更新
-
- window11 系統(tǒng)安裝 yarn
- 超詳細win安裝深度學習環(huán)境2025年最新版(
- Linux 中運行的top命令 怎么退出?
- MySQL 中decimal 的用法? 存儲小
- get 、set 、toString 方法的使
- @Resource和 @Autowired注解
- Java基礎操作-- 運算符,流程控制 Flo
- 1. Int 和Integer 的區(qū)別,Jav
- spring @retryable不生效的一種
- Spring Security之認證信息的處理
- Spring Security之認證過濾器
- Spring Security概述快速入門
- Spring Security之配置體系
- 【SpringBoot】SpringCache
- Spring Security之基于方法配置權
- redisson分布式鎖中waittime的設
- maven:解決release錯誤:Artif
- restTemplate使用總結
- Spring Security之安全異常處理
- MybatisPlus優(yōu)雅實現(xiàn)加密?
- Spring ioc容器與Bean的生命周期。
- 【探索SpringCloud】服務發(fā)現(xiàn)-Nac
- Spring Security之基于HttpR
- Redis 底層數(shù)據(jù)結構-簡單動態(tài)字符串(SD
- arthas操作spring被代理目標對象命令
- Spring中的單例模式應用詳解
- 聊聊消息隊列,發(fā)送消息的4種方式
- bootspring第三方資源配置管理
- GIT同步修改后的遠程分支