国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

git問題:git@github.com: Permission denied (publickey). fatal: Could not read from remote repository.

這篇具有很好參考價值的文章主要介紹了git問題:git@github.com: Permission denied (publickey). fatal: Could not read from remote repository.。希望對大家有所幫助。如果存在錯誤或未考慮完全的地方,請大家不吝賜教,您也可以點擊"舉報違法"按鈕提交疑問。

重裝系統(tǒng)后,git push項目時出現(xiàn)git@github.com: Permission denied (publickey). fatal: Could not read from remote repository.Please make sure you have the correct access rights and the repository exists.出現(xiàn)這個問題表示你在嘗試將本地代碼推送到GitHub時,沒有提供正確的公鑰,或者你的公鑰沒有被添加到你的GitHub賬戶中。

1.檢查你的SSH密鑰

在命令行中運行 ls -a ~/.ssh 來查看是否存在 .pub 文件。這個 .pub 文件就是你的公鑰。

ls -a ~/.ssh

我這里的情況是沒有.pub文件,我是直接重新生成密鑰

2.重新生成密鑰

ssh-keygen -t rsa -C "your-email@example.com"

這里,-t rsa 表示生成RSA類型的密鑰,-C “your-email@example.com” 是你的郵箱地址,可以根據(jù)需要更改。在生成密鑰時,會要求你輸入一個文件路徑來保存私鑰文件,默認為 ~/.ssh/id_rsa,你可以按回車鍵使用默認路徑。

Generating public/private rsa key pair.:這是命令的輸出,告訴你系統(tǒng)正在生成一個RSA公鑰/私鑰對。

Enter file in which to save the key (/c/Users/Administrator/.ssh/id_rsa)::系統(tǒng)提示你輸入一個文件路徑來保存生成的私鑰。默認的文件路徑是/c/Users/Administrator/.ssh/id_rsa。如果你想保存到其他位置或使用不同的文件名,可以在提示時輸入。如果你按回車鍵,私鑰將被保存在默認位置。

Enter passphrase (empty for no passphrase)::這是提示你輸入私鑰的密碼短語。密碼短語是私鑰的一個可選的安全保護層,用于保護私鑰不被未經(jīng)授權的訪問。如果你選擇不使用密碼短語(即直接按回車鍵),私鑰將沒有密碼保護。

3. 添加SSH密鑰到GitHub賬戶

密鑰生成成功后,命令行中Your public key has been saved in /c/Users/Administrator/.ssh/id_rsa.pub告訴你公鑰被保存的文件路徑;
登錄到你的GitHub賬戶,點擊右上角的“設置”按鈕,進入“SSH和GPG密鑰”頁面。在該頁面中,點擊“New SSH key”按鈕。在新打開的對話框中,將你生成的公鑰復制粘貼到文本框中(可以用記事本打開上面那個公鑰文件),并輸入一個標題(例如“My SSH Key”)。然后,點擊“Add key”按鈕。

4. 驗證SSH密鑰是否設置成功:在終端或命令提示符中,使用以下命令測試SSH密鑰是否設置成功:

ssh -T git@github.com

Are you sure you want to continue connecting (yes/no/[fingerprint])? yes:詢問你是否確定要繼續(xù)連接。如果你選擇“yes”,那么這個主機的公鑰將被添加到已知主機列表中,這樣下次連接時就不需要再次確認。

5.設置Git倉庫的遠程地址為SSH類型

在終端或命令提示符中,導航到你的本地Git倉庫所在的目錄,并執(zhí)行以下命令來設置遠程倉庫地址為SSH類型:

git remote set-url origin <your-ssh-url>

6.驗證遠程倉庫地址是否設置正確

使用以下命令查看遠程倉庫地址是否正確設置:

git remote -v

如果一切設置正確,你將看到類似以下輸出:
origin git@github.com:/.git (fetch)
origin git@github.com:/.git (push)

現(xiàn)在你已經(jīng)成功設置了SSH密鑰,并可以使用SSH協(xié)議將代碼推送到GitHub倉庫。文章來源地址http://www.zghlxwxcb.cn/news/detail-831891.html

到了這里,關于git問題:git@github.com: Permission denied (publickey). fatal: Could not read from remote repository.的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來自互聯(lián)網(wǎng)用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。如若轉載,請注明出處: 如若內(nèi)容造成侵權/違法違規(guī)/事實不符,請點擊違法舉報進行投訴反饋,一經(jīng)查實,立即刪除!

領支付寶紅包贊助服務器費用

相關文章

  • 解決git@github.com: Permission denied (publickey). Could not read from remote repository

    解決git@github.com: Permission denied (publickey). Could not read from remote repository

    原因分析 Permission denied (publickey) 沒有權限的publickey ,出現(xiàn)這錯誤一般是以下兩種原因 客戶端與服務端未生成 ssh key 客戶端與服務端的ssh key不匹配 找到問題的原因了,解決辦法也就有了,重新生成一次ssh key ,服務端也重新配置一次即可。 客戶端生成ssh key 470812087@qq.com改為

    2024年02月04日
    瀏覽(20)
  • 【git】git@github.com: Permission denied (publickey).報錯問題

    【git】git@github.com: Permission denied (publickey).報錯問題

    本媛開發(fā),會經(jīng)常性用到gitee GitHub兩個庫 畢竟國內(nèi)項目轉戰(zhàn)倉到gitee, 但是國外原框架還是GitHub居多 于是就出現(xiàn)連接pull-push經(jīng)常性切換問題 這個報錯是因為本地兩個倉都有ssh公共私有密鑰導致的 2.1.1 是因為首次本地聯(lián)通沒有配置密鑰,或者配置錯誤? 如果是因為第一次配

    2024年02月11日
    瀏覽(23)
  • 解決git@github.com:Permission denied (publickey). Could not read from remote repository. Please make s

    解決git@github.com:Permission denied (publickey). Could not read from remote repository. Please make s

    這個錯誤通常表示沒有正確的權限來訪問該 Git 倉庫。 為了解決GitHub上的權限問題,需要執(zhí)行以下步驟: 打開命令行終端(例如Git Bash)并輸入以下命令: 將公鑰添加到GitHub帳戶中, 執(zhí)行以下步驟: 在“Title”字段中為新密鑰提供一個描述性標題。 將“Key”字段中的公鑰粘

    2024年02月06日
    瀏覽(56)
  • Git報錯:git@github.com: Permission denied (publickey)

    輸入指令 ssh -T git@github.com 測試SSH鏈接,出現(xiàn)如下報錯: git@github.com: Permission denied (publickey,password,keyboard-interactive). git@github.com: Permission denied (publickey). git@github.com\\\'s password: ,但是即是你輸入的是正確的密碼,依舊提示 Permission denied, please try again. 。 在網(wǎng)上搜索相關解決方案,

    2024年02月02日
    瀏覽(28)
  • git報錯:Permission denied (publickey). fatal: Could not read from remote repository.

    git報錯:Permission denied (publickey). fatal: Could not read from remote repository.

    背景 :由于新?lián)Q了電腦,新裝了git,所以在用git拉取代碼的時候就出現(xiàn)了標題一樣的錯誤 ternimal下出現(xiàn)下面錯誤: Permissiondenied (publickey). fatal:Could not read from remote repository. Pleasemake sure you have the correct access rights and the repository exists. 分析原因 : 原因是由于你在本地(或者服務

    2024年02月05日
    瀏覽(28)
  • git克隆報錯:Permission denied (publickey).fatal: Could not read from remote repository解決辦法

    git克隆報錯:Permission denied (publickey).fatal: Could not read from remote repository解決辦法

    Permission denied (publickey).fatal: Could not read from remote repository 1、問題解決首先參考文章 例如:缺少公鑰解決辦法 2、生成公鑰報錯 ssh-keygen -t rsa -C ‘郵箱’ 生成公鑰時,報錯如下: 解決辦法: 需要換到C盤的C:UsersASUS.ssh目錄下,再右鍵Git Bash Here 輸入命令: ssh-keygen -t rsa -C \\\'

    2024年02月04日
    瀏覽(26)
  • Git push異常:Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password) fatal: Could not read

    Git push異常:Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password) fatal: Could not read

    在使用新的gitlab倉庫遷移舊代碼時,當push代碼,報了如下異常: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password) .fatal: Could not read remote repository. 在git bash下 1.先清楚本地舊的賬號密碼: git config --global --unset credential.helper 2.重新設置用戶名稱和郵箱 git config --global user.nam

    2024年03月17日
    瀏覽(31)
  • 解決在linux上git clone 時報錯 git@gitee.com: Permission denied (publickey). Could not read from remote repo

    解決在linux上git clone 時報錯 git@gitee.com: Permission denied (publickey). Could not read from remote repo

    今天在gitee上看到一個比較感興趣的項目,于是就想下載下來研究研究,結果git clone 克隆的時候報錯了,報錯如下: git@gitee.com: Permission denied (publickey).fatal: Could not read from remote repository.Please make sure you have the correct access rights and the repository exists. Permission denied (publickey) 沒有權

    2024年02月11日
    瀏覽(29)
  • Permission denied (publickey). fatal: Could not read from remote repository.

    Permission denied (publickey). fatal: Could not read from remote repository.

    將本地代碼推送到遠程分支報錯:Permission denied (publickey). fatal: Could not read from remote repository. 確保已經(jīng)添加了正確的 SSH 密鑰??梢允褂靡韵旅顧z查 SSH 密鑰是否已經(jīng)添加: 如果看到消息 “Hi [username]! You\\\'ve successfully authenticated, but GitHub does not provide shell access.” ,則表示已成

    2023年04月18日
    瀏覽(20)
  • 終極辦法!connect to host port 22: Connection timed out git@ssh.github.com: Permission denied (publickey

    終極辦法!connect to host port 22: Connection timed out git@ssh.github.com: Permission denied (publickey

    過了個周末git突然用不了了,在拉代碼的時候突然報錯連接超時,又報錯說沒有權限,這就很煩了 在百度了很久以后嘗試了各種辦法,重新生成pub_key,重裝git等等都沒能解決,最后詢問了公司大佬,困擾了一個上午的問題終于解決了 先說說百度上的解決辦法: 使用命令 s

    2024年02月04日
    瀏覽(19)

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請作者喝杯咖啡吧~博客贊助

支付寶掃一掃領取紅包,優(yōu)惠每天領

二維碼1

領取紅包

二維碼2

領紅包