GIT 推送抱怨不受信任的 X11 转发设置失败

发布于 2024-11-15 03:33:45 字数 455 浏览 2 评论 0原文

我是 git 和 OSX 的新手,来自 Ubuntu 和 svn。

当我从 OSX 终端 shell 执行“git Push”时,我收到以下警告:

folklore$ git push origin master
Warning: untrusted X11 forwarding setup failed: xauth key data not generated
Warning: No xauth data; using fake authentication data for X11 forwarding.
Counting objects: 7, done.

它似乎工作正常,它只是一个警告。但我不明白。为什么这里有X11?

我检查了我的 .ssh/ 密钥,它们正确的是 600。

我想我可以继续忽略该警告,但我宁愿清理它。也许还能学到一点。

I'm new to both git and OSX, coming from Ubuntu and svn.

When I do a "git push" from the OSX terminal shell, I get the following warning:

folklore$ git push origin master
Warning: untrusted X11 forwarding setup failed: xauth key data not generated
Warning: No xauth data; using fake authentication data for X11 forwarding.
Counting objects: 7, done.

It seems to be working fine, its just a warning. But I dont' understand it. Why is there any X11 in play here?

I've checked my .ssh/ keys and they are properly 600.

I guess I could just keep ignoring the warning, but I'd rather clean it up. And perhaps learn a bit.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

梦旅人picnic 2024-11-22 03:33:45

这是一个 ssh 问题,而不是 git 问题。您看到的不是 git 抱怨,而是来自 ssh 客户端的有效警告。您应该确保您的 ssh 配置默认情况下不会尝试 X11 转发(git 不需要它),或者至少为您要连接的主机将其关闭。

在您的 ~/.ssh/config 中尝试:

ForwardX11 no

在主机特定部分或全局中。

This is an ssh issue, not a git issue. What you are seeing is not a git whine, it's a valid warning from your ssh client. You should ensure that your ssh config doesn't attempt X11 forwarding by default (git doesn't need it), or at least turn it off for the host you are connecting to.

In your ~/.ssh/config try:

ForwardX11 no

either in the host specific section or globally.

本王不退位尔等都是臣 2024-11-22 03:33:45

如果您想删除 github 的此消息(根据您的评论推断),您的
~/.ssh/config 应包含:

Host *github.com
   ForwardX11 no

由于 Host 后面的值需要是一个模式,以匹配提供给 ssh 的主机名。 (例如,您也可以使用 Host *github.* )。

当然,其他元素(HostNameUser 等)也可以添加到该主机。

If you want to get rid of this message for github (as deduced from your comments), your
~/.ssh/config should contain:

Host *github.com
   ForwardX11 no

As the value after Host needs to be a pattern to match the hostname given to ssh. (You could e.g. also use Host *github.* ).

Of course other elements (HostName, User, etc.) can be added to this host as well.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文