【发布时间】:2017-08-22 20:38:42
【问题描述】:
每当我尝试从命令行将更改推送到远程 github 存储库时,都会收到以下错误:
> git push
remote: Repository not found.
fatal: repository 'https://github.com/MyOrg/MyRepo.git' not found
(我已经替换了 org 和 repo 名称,但它们绝对是正确的名称)。
我已检查我对存储库有写访问权。我可以通过github 网站创建分支并写入文件,并将这些更改拉回本地。
我正在使用Git Credential Manager for Windows (GCM) 向 github 进行身份验证,我在 gitconfig 中有以下内容:
[credential]
helper = manager
我在 Windows 10 上运行,git 版本 2.10.2.windows.1。
【问题讨论】:
-
你看过这个吗? stackoverflow.com/questions/10116373/… 他们建议将用户名添加到网址中,例如:myusername@github.com/path_to/myRepo.git
-
您是否使用
git init正确初始化了本地git repo 并添加了远程git remote add origin https://github.com/user/repo.git?对不起,如果这很明显 -
@SvinSimpe 该仓库是从 github 克隆的,如果我运行
git remote show origin,它看起来都设置正确。 -
@SebastianBerge 尝试了
git remote set-url origin https://username@github.com/path_to_myRepo.git,但仍然设置了未找到存储库错误。