1. 程式人生 > >Could not read from remote repository.Please make sure you have the correct access rights.解決方法

Could not read from remote repository.Please make sure you have the correct access rights.解決方法

我們在使用git clone 或其他命令的時候,有時候會遇到這類問題,如圖:

fatal: Could not read from remote repository.

Please make sure you have the correct access rights

and the repository exists.

fatal: Could not read from remote repository.Please make sure you have the correct access rights and the repository exists.

出現這個問題是因為沒有在github賬號新增SSH key

解決方法如下:

1.在終端輸入。

ssh-keygen -t rsa -C "username" (注:username為你git上的使用者名稱)

如果執行成功。返回

Generating public/private rsa key pair.

Enter file in which to save the key (/Users/username/.ssh/id_rsa):

Generating public/private rsa key pair.
Enter file in which to save the key (/Users/username/.ssh/id_rsa): 

首先,說明一下,這裡的username

是你電腦上的使用者名稱

然後,在這裡就是設定儲存地址了.我們直接按回車,會出現一下兩種情況的一種:

(1)如果正常執行的話,會出現

Enter passphrase (empty for no passphrase):

然後我們直接回車

(2)有的時候我們可能會出現

/Users/your username/.ssh/id_rsa already exists.

Overwrite (y/n)?

這說明你已經設定了儲存地址,我們輸入“y”覆蓋

Overwrite (y/n)? y

回車

上面的任意兩種情況之後,會出現

Enter same passphrase again: 

再次回車,這時候你會看見:

Your identification has been saved in /Users/username/.ssh/id_rsa.

Your public key has been saved in /Users/username/.ssh/id_rsa.pub.

The key fingerprint is:

58:42:8b:58:ad:4b:b5:b9:6d:79:bf:8c:f9:e2:2b:ed username

The key's randomart image is:

+--[ RSA 2048]----+

|    ...          |

|   o oo.         |

|  . .ooo.        |

|    o o+         |

|   . ..oS.       |

|    . . + .      |

|       . o .     |

|        . o+.    |

|         +E++.   |

+-----------------+


這說明SSH key就已經生成了。檔案目錄就是:/Users/username/.ssh/id_rsa.pub.

我們執行cat命令檢視檔案的內容:

cat /User/username/.ssh/id_rsa.pub

這時候會看見:

ssh-rsa AAAAB3NzaC1yc2。。。。。。。。。

後面的內容我省略了

(說明:ssh-rsa 後面的內容這就是你的SSH keys)

把顯示出來的SSH keys直接新增到github賬戶設定裡邊的SSH keys

  • 在右上角賬戶那裡點選頭像邊上的下拉,出現如圖——點選settings進去,找到左側的SSH Keys,點選,如圖;

  • 在點選Add SSH Key,在title處填入任意的標識,在Key部分裡面新增剛才複製的id_rsa.pub檔案裡的內容,點選新增即可;

  • 最後一步了,只需測試一下連結是否正常了,接著輸入:ssh -T [email protected],這時會問是否繼續連線,我們輸入 yes,這樣,我們的git配置就完成了。


最後再執行git clone命令就可以了


相關推薦

Could not read from remote repository.Please make sure you have the correct access rights.解決方法

我們在使用git clone 或其他命令的時候,有時候會遇到這類問題,如圖:fatal: Could not read from remote repository.Please make sure you have the correct access rightsand

git "Could not read from remote repository.Please make sure you have the correct access rights."解決方案

我們在使用git clone 或其他命令的時候,有時候會遇到這類問題,如圖: fatal: Could not read from remote repository. Please make sure you have the correct access rig

Git"Could not read from remote repository.Please make sure you have the correct access rights."解決方案

我們在使用Git clone 或其他命令的時候,有時候會遇到這類問題,如圖: fatal: Could not read from remote repository. Please make sure you have the correct access ri

Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights

please sudo _id ima upd cal .com root pin 第一次提交遇到這樣的情況,怎麽回事呢,我在github上提交了ssh key 的啊。 排查先看看能不能解析, 1.先 ping https://github.com 把ip添加到 ho

git "Could not read from remote repository.Please make sure you have the correct access rights."解決方案

tpc 覆蓋 com 設置 _id pub ould ack ref 我們在使用git clone 或其他命令的時候,有時候會遇到這類問題,如圖: fatal: Could not read from remote repository. Please make s

git clone報錯 "Could not read from remote repository..Please make sure you have the correct access

1.下載git,使用命令: yum install git 2.配置git: 1 git config --global user.name "Your Name" 2 git config --global user.email "[email protected]"

[Git]Please make sure you have the correct access rights and the repository exists

perm not 配置 兩個 需要 acc repos http 機器 這個問題是這樣,需要在已有github賬號的A機器上,再創建一個github賬號,新賬號創建完畢,將代碼通過機器A push上之後,再另一臺機器B,clone 這個項目時報出了如下錯誤: Permiss

Git clone時出現Please make sure you have the correct access rights and the repository exists.問題已解決

already 下載 cor 兩個 .com pair 賬戶 same 使用 看了好多資料終於搞定了git 中clone命令報錯這個問題,廢話不多說直接上步驟希望對大家有幫助。 1 刪除.ssh文件夾(直接搜索該文件夾)下的known_hosts(手動刪除即可

git下載代碼遇到的‘Please make sure you have the correct access rights and the repository exists’問題

log strong nbsp urn 成功 參考 刪除 ron mail 接著昨天的搭建博客,今天想直接把vuepress克隆到我的電腦上,結果出現了問題 忘記截圖了,反正就記得這麽一句話:‘Please make sure you have the correct

(轉)git遇到的問題之“Please make sure you have the correct access rights and the repository exists.”

key pair 遇到 重新 出了 csdn ssh-key vat work 直接 對於git的提交一直很小心翼翼,感覺一不小心就會踩到莫名的坑。 這不, 某天commit 就遇到了On branch master nothing to commit (wor

git 訪問自建gitlab報錯:Please make sure you have the correct access rights and the repository exists.

1.首先設定git身份的名字和郵箱:     git config --global user.name "yourname"     git config --global user.email“[email protected]"

git下載程式碼遇到的‘Please make sure you have the correct access rights and the repository exists’問題

接著昨天的搭建部落格,今天想直接把vuepress克隆到我的電腦上,結果出現了問題 忘記截圖了,反正就記得這麼一句話:‘Please make sure you have the correct access rights and the repository exists’ 在網上搜索了一

git遇到的問題:Please make sure you have the correct access rights and the repository exists.解決方案

輸入:git push -u origin master命令出現以下類似內容 Theauthenticity of host 'github.com (13.250.167.23)' can't be established. RSAkey fingerprint is SHA256:nTh

git pull出錯fatal:Please make sure you have the correct access rights.and the repository exists.

初學liunx,真是坑爹很多了,每天的錯誤。。。 Warning: Permanently added the RSA host key for IP address ‘192.168.25.*’ to the list of known hosts. Pe

git遇到的問題之“Please make sure you have the correct access rights and the repository exists.

Please make sure you have the correct access rights and the repository exists. 然後谷歌了一下,原來是ssh key有問題,連線不上伺服器~~ 參閱了很多的答案,發現寫的都不是很完

Please make sure you have the correct access rights

A "Permission denied" error means that the server rejected your connection. There could be several reasons why, and the most common examples are explai

git: fatal: Could not read from remote repository

nag fatal choose native tell ack arch manage fat This is probably an Intellij problem. Your key are managed natively by ssh, and Intellij

git提示錯誤關於錯誤:ssh: Could not resolve hostname github.com: Name or service not known.fatal: Could not read from remote repository.

eight 無法讀取 主機名 github上 錯誤2 winsock nal file drive 關於 Git 使用中出現的錯誤 饑人谷_楠柒 關註 2016.11.02 15:33* 字數 746 閱讀 3607評論 5喜歡 10贊賞 1 關

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

ech IT git 生成 兩個文件 tin 一個 繼續 con 執行語句git push -u origin master的時候出現下面的錯誤 Permission denied (publickey).fatal: Could not read from remo

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

問題描述: 最近剛剛學爬蟲,從學長的git上clone到伺服器的時候 出現的這個問題,問題不大吧,估計以後還會遇到。 問題很簡單,就是沒有祕鑰,顯然github不知道你是誰,然後禁止你拉取程式碼。 原理:本地生成祕鑰,然後新增到GitHub裡面 DONE 解決方法: 1.本地生成祕鑰: