On Friday, February 7, 2014 12:45:58 AM UTC+1, Matthew Hagerty wrote:
> I have to specify the git-upload-pack with git.  Since there are options 
> in the gitconfig file for specifying the upload and receive pack commands 
> on the remote side, why do I have to use the -u option with clone?
> My gitconfig contains:
> [remote "origin"]
>    uploadpack = /path/to/server/git-upload-path
>    receivepack = /path/to/server/git-receive-path

I assume that this is in your ~/.gitconfig, but as far as I know, this 
configuration belongs in the repo/.git/config file of a repository that 
already exists. You can't globally configure options for all remotes called 
"origin" like this, and even if you could, it would be sort of weird if the 
configuration was applied even before the repository is initialized/cloned.

> If I try:
> git clone ssh://user@a.b.c.d:/path/to/repo.git
> I get the dreaded:
> ksh: git-upload-pack: not found
> If I include the -u option it works:
> git clone -u "/path/to/server/git-upload-path" 
> ssh://user@a.b.c.d:/path/to/repo.git
> Cloning into 'repo'...
> So apparently git is not using the settings in the config file, so why 
> does the config file even support such options?
After the initial clone (using -u), you can configure this so you don't 
have to keep doing -u the next times you pull from the remote. Example 

Anyway, a far better approach is to fix the PATH on the server to include 
git-upload-pack, as suggested 

You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to