Git/Trouble

From KitwarePublic
< Git
Jump to: navigation, search

Cloning

Firewall Blocks Port 9418

Some institutions have firewalls that block Git's native protocol port 9418. Use the "url.<base>.insteadOf" configuration option to map git URLs to http:

$ git config --global url.http://public.kitware.com/.insteadOf git://public.kitware.com/

(Replace "public.kitware.com" the server name for your actual repository URL.) This tells Git to translate URLs under the hood by replacing prefixes. After running these commands once in your home directory then you can just use the "git://" mentioned elsewhere on this page and git will use the http protocol automagically.

Git Below 1.6.5

Some projects with submodules specify a clone command with the --recursive option such as:

$ git clone --recursive git://public.kitware.com/repo.git

but this option is supported only in Git 1.6.5 or higher. To clone the repository using Git 1.6.4 or lower, use the commands

$ git clone git://public.kitware.com/repo.git
$ cd repo
$ git submodule init
$ git submodule update

Pushing

The remote end hung up unexpectedly

If git push fails with

fatal: The remote end hung up unexpectedly

check that you set the pushurl with "git config". The push URL is typically a ssh-protocol version of the clone URL. For example, if you cloned from

git://public.kitware.com/repo.git

then the push URL may be configured as

$ git config remote.origin.pushurl git@public.kitware.com:repo.git

See your project push instructions for the actual push URL.

If you suspect your ssh key may not be configured correctly, see the authentication test instructions.