git - 无法解析主机名 git : nodename nor servname provided, 或未知

标签 git

我尝试执行 git pull --rebase 但我收到以下错误:

ssh: Could not resolve hostname git: nodename nor servname provided, or not known
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

我尝试执行 git remote -v 并正确列出了来源。

我该如何修复这个错误?

最佳答案

我最近通过从我的 fork 上的远程地址中删除 ssh 解决了这个问题:

origin  ssh://git@ghe.company.net:yunus/client.git (fetch)
origin  ssh://git@ghe.company.net:yunus/client.git (push)
...

更新为:

origin  git@ghe.company.net:yunus/client.git (fetch)
origin  git@ghe.company.net:yunus/client.git (push)
...

关于git - 无法解析主机名 git : nodename nor servname provided, 或未知,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20643002/

相关文章:

git - merge 时的 DIRTY_INDEX

git - 创建获取最后一次提交的 Git 别名

git - Hg 相当于 git post-receive hook

git 应用 --3way : don't abort if some hunks fail

git - 在 oh-my-zsh 中 stash git 分支信息

git - 我怎样才能在远程分支上获取最新信息?

git - 错误 : The following untracked working tree files would be overwritten by checkout

git - 忽略来自 Git 存储库及其克隆的版本控制文件

Eclipse/EGit 查看文件的先前版本 (Git)

git - npm run build 如果成功则提交