GIT 推送抱怨不受信任的 X11 转发设置失败
我是 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这是一个 ssh 问题,而不是 git 问题。您看到的不是 git 抱怨,而是来自 ssh 客户端的有效警告。您应该确保您的 ssh 配置默认情况下不会尝试 X11 转发(git 不需要它),或者至少为您要连接的主机将其关闭。
在您的
~/.ssh/config
中尝试:在主机特定部分或全局中。
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:either in the host specific section or globally.
如果您想删除 github 的此消息(根据您的评论推断),您的
~/.ssh/config
应包含:由于
Host
后面的值需要是一个模式,以匹配提供给 ssh 的主机名。 (例如,您也可以使用Host *github.*
)。当然,其他元素(
HostName
、User
等)也可以添加到该主机。If you want to get rid of this message for
github
(as deduced from your comments), your~/.ssh/config
should contain:As the value after
Host
needs to be a pattern to match the hostname given to ssh. (You could e.g. also useHost *github.*
).Of course other elements (
HostName
,User
, etc.) can be added to this host as well.