簡體   English   中英

遠程:找不到用於git pull的存儲庫

[英]remote: Repository not found for git pull

當我執行git pull ,出現以下錯誤

remote: Repository not found.
fatal: repository 'https://github.com/repo.git' not found

但是當我運行git pull https://username@github.com/repo.git ,git能夠提取存儲庫,並且不需要輸入密碼。

為什么現在需要提及我的用戶名? PS:我確實設置了git config user.name username

配置文件的一部分

[core]
        repositoryformatversion = 0
        filemode = true
        bare = false
        logallrefupdates = true
        ignorecase = true
        precomposeunicode = true
[remote "origin"] 
        url = https://github.com/repo.git 
        fetch = +refs/heads/*:refs/remotes/origin/* 
[user] 
        name = github_username

我認為git用戶名和github用戶名不是同一回事。 git用戶名是您在本地計算機上提交的標識符。

存儲庫的路徑是否可能輸入錯誤? 例如,您可以通過登錄github並查看“克隆或下載”下的URL進行檢查。 在大多數情況下,采用以下形式

https://github.com/repository/repo.git

您確定兩次都嘗試通過http拉嗎? 第二條路徑(不帶https)對我來說似乎是ssh身份驗證。 如果您已設置ssh,則git不會要求您進行身份驗證,因為ssh密鑰是您的實際身份驗證。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM