【问题标题】:Github Enterprise: remote: Repository not found from cmdline, works with Github desktopGithub Enterprise:远程:从 cmdline 找不到存储库,可与 Github 桌面一起使用
【发布时间】:2017-08-25 02:54:17
【问题描述】:

github 企业版,windows 10。email+token 仅适用于 github 桌面工具。在 powershell、git bash 和 cmd 控制台中失败。

错误 - 远程:未找到存储库。致命:https://(enterprise hostname)/(org name)/(repo name).git 的身份验证失败

运行测试场景:在 github 站点上创建了新的 repo,使用的路径来自克隆链接。使用示例代码生成 readme.md, git add 。 (成功); git commit -m "notes"(成功); git push -u origin master(失败)

git config --system contains "config.helper=manager" (GCM)

GCM 弹出提示输入凭据(输入电子邮件;令牌),连接失败,并且 github 也未添加到 windows 凭据管理器。

GCM 提示输入凭据(取消),命令行提示输入用户名(电子邮件)和密码(令牌),连接失败

cmd runas 管理员

git config --system --unset config.helper (no effect)
git config --system config.helper=wincred (no effect)
git config --system config.helper=cache (no effect)
git config --system --list (still shows "config.helper=manager")

尝试删除原点并重置,没有效果

git 存在于我机器上的多个位置:

  • C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git
  • C:\Program Files\Git
  • C:\Users{用户名}\AppData\Local\GitHub\PortableGit_f02737a78695063deace08e96d5042710d3e32db

Github desktop --> options: 能够成功添加github企业登录: 电子邮件或用户名;令牌; https://(enterprise主机名) 能够成功“同步”

我是组织和回购协议的创建者和所有者。 所有这些都在 Windows 7 上运行,我刚刚安装了 Windows 10 并生成了一个新令牌,试图拉下我的存储库并使它们进入可用状态。

做了很多研究,尝试了几件事,不知道还能尝试什么,真的需要命令行界面才能工作。任何建议,不胜感激。

【问题讨论】:

    标签: authentication cmd windows-10 github-enterprise


    【解决方案1】:

    我执行了以下步骤(如下)并且能够将问题隔离到 GCM 或我尝试使用它的方式。指定旧工具“wincred”解决了我的问题。

    [安装程序:Microsoft Git Credential Manager for Windows setup v 1.9.0]

    • 删除了 GCM 安装
    • 删除了 Git Windows 安装
    • 删除本地 git 目录
    • 已移除 GitHub 桌面
    • 生成的新令牌

    使用 GCM 安装 GIT 窗口 进行了克隆测试 - GCM弹出,输入电子邮件+令牌 - 身份验证失败 删除了 Windows 的 git 在没有 GCM 的情况下重新安装 进行了克隆测试(git bash) - 命令行提示使用/密码 克隆成功 删除本地仓库


    已安装 Github 桌面 使用电子邮件+令牌进行身份验证 从远程存储库克隆到本地 成功 关闭 GitHub 桌面,移除本地 repo


    运行 git bash 克隆的远程仓库 - 命令行提示使用/密码 克隆成功 关闭 Git bash,移除本地仓库


    已安装独立 GCM git config --global credential.helper manager 跑了 git bash 克隆的远程仓库 (失败的) 远程:未找到存储库。 致命:(克隆网址)的身份验证失败

    已卸载 GCM git config --global --unset credential.helper 删除本地仓库


    运行 git bash git config --global credential.helper wincred 克隆的远程仓库 - 命令行提示使用/密码 克隆成功 更新了 readme.md git add, git commit, git push -u origin master (成功) 注意到 git 添加到凭据管理器中的 Windows 凭据/通用凭据。地址存储为 git:https://(username)@github...


    由于 git 条目现在在凭据管理器中,让我们再试一次 GCM

    已安装独立 GCM git config --global credential.helper manager

    对 readme.md 进行了更改 git 添加,git 提交,git 推送 (失败的) 远程:未找到存储库。 致命:(克隆网址)的身份验证失败

    已卸载 GCM git config --global --unset credential.helper


    重置为 wincred

    git config --global credential.helper wincred git 添加,git 提交,git 推送 (成功)

    对我来说,问题似乎出在微软的 GCM 或我尝试使用它的方式上。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-04-28
      • 2021-10-03
      • 2010-12-31
      • 1970-01-01
      • 2023-01-25
      • 1970-01-01
      • 2021-04-24
      相关资源
      最近更新 更多