git/list[1] front-page[2] threads[3] people[4] search[5] about
 

remote.origin.*pack settings are not honored when repository is specified

From
THTrevor Harmon <trevor@vocaro.com>
Date
Mar 21, 2011, 18:31 UTC
Message-ID
<982706A6-A00E-43B3-9002-41C8DC084EC9@vocaro.com>
Hi,
I'm trying to set up a remote repository on a shared hosting provider. The provider doesn't have Git on their system, so I installed it to a custom location: ~/opt. That should be sufficient to allow external clients to use the repository, but there's a snag: The provider prevents users from modifying the PATH variable for non-interactive shells, which means I can't add ~/opt/bin to the server's PATH for SSH sessions. As a result, users who attempt to clone the repository get an error:
  bash: git-upload-pack: command not found
Luckily, users can work around this issue by providing Git with the command's location:
  git clone -u /home/[user]/opt/bin/git-upload-pack [repository]
but a subsequent "git pull" on the working copy also fails for the same reason, though that's also easily remedied:
  git config remote.origin.uploadpack '/home/[user]/opt/bin/git-upload-pack'
However, there's one last problem I can't find a workaround for... Specifying the repository explicitly when doing a "git pull", such as:
  git pull someguy@somewhere.com:git/some-repository.git
still gives a "git-upload-pack: command not found" error. It seems that Git isn't honoring the remote.origin.uploadpack value here. This is a problem because I'm using a third-party automated tool for handling pushes, and it's hard-coded to always specify the repository in the command (as opposed to the default from the remotes list).
Is this a bug in Git? Thanks,
Trevor
Next: Erik Faye-Lund
Message 1 of 3 in “remote.origin.*pack settings are not honored when repository is specified”
  1. Trevor HarmonMar 21, 2011
  2. Erik Faye-LundMar 21, 2011
  3. Trevor HarmonMar 21, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.