Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GIT push whines about untrusted X11 forwarding setup failed

Tags:

git

macos

x11

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.

like image 958
fishtoprecords Avatar asked Jun 11 '11 16:06

fishtoprecords


2 Answers

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.

like image 190
CB Bailey Avatar answered Nov 01 '22 13:11

CB Bailey


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.

like image 25
Anthon Avatar answered Nov 01 '22 14:11

Anthon