繁体   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