【问题标题】:Git Config issueGit 配置问题
【发布时间】:2014-12-02 18:48:29
【问题描述】:

我想我可能错误地为 Git 的命令行工具配置了我的配置文件。

每当我尝试使用 git 存储库 URL 安装某些东西时,我都会收到以下错误:

fatal: '.insteadofgithub.com/angular/bower-angular.git' does not appear to be a git repository

我使用了将git:// 替换为http:// 的URL,但不幸的是,它没有恢复。

是否有命令行来重新配置我的网址?

【问题讨论】:

  • 你不必用你的名字签名,因为它会自动出现在你帖子的右下角。
  • 你能发布你的 .gitconfig 内容吗?可能是错误的insteadOf 条目。

标签: macos git github terminal repository


【解决方案1】:

insteadOf 似乎被滥用了。如果您想使用https:// 而不是git:// 或其他内容,您可以使用:

git config --global url."https://".insteadOf git://

这将在您的${HOME}/.gitconfig 文件中添加以下内容:

[url "https://"]   
    insteadOf = git://

【讨论】:

    猜你喜欢
    • 2016-05-21
    • 1970-01-01
    • 2017-07-29
    • 2020-11-20
    • 2018-07-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-05-28
    相关资源
    最近更新 更多