Facebook Twitter Instagram
    WiredRevolution.com
    • Home
    • About
    • Contact Us
    • Essential Linux Commands
    • Sitemap
    Facebook Twitter Instagram
    WiredRevolution.com
    git

    Fix git-upload-pack and git-receive-pack errors on shared hosting

    RyanBy RyanFebruary 24, 20114 Comments1 Min Read
    Facebook Twitter Pinterest LinkedIn Reddit WhatsApp Email

    When pulling from a remote git repository located on shared hosting you will get the “git-upload-pack: command not found” error. A similar error occurs with the git-receive-pack when doing a push as well. This occurs when git is installed locally (in your home directory), and not system wide because git cannot locate these binaries.

    Normally this can be fixed by setting the $PATH environment variable to include the correct path to these binaries on the remote server. Unfortunately it will not work in this case as .bashrc is not sourced since the command is invoked in non-interactive mode via ssh.

    There are 2 solutions to this problem.

    The first solution is to explicitly include the path to the binaries when pushing or pulling from your local repository.

    $ git pull --upload-pack /path/to/git/git-upload-pack$ git push --receive-pack /path/to/git/git-receive-pack

    The second solution involves adding the path to your git-upload-path and git-recieve-path in your local .git/config file under [remote “origin”]. This is the easiest method as you only have to make this change once.

    [remote "origin"]
    url = <repo address>
    fetch = +refs/heads/*:refs/remotes/origin/*
    uploadpack = <path to git-upload-pack>
    receivepack = <path to git-receive-pack>

    Share. Facebook Twitter Pinterest LinkedIn WhatsApp Reddit Email
    Previous ArticleSetup USB support in Oracle VirtualBox
    Next Article Install GNOME Shell in Ubuntu 10.10 Maverick

    Related Posts

    Fix insync Gnome Shell extension error on Ubuntu

    Transfer your ssh public key to a remote machine

    Fix SketchUp refresh bug on Linux with WINE

    Most Commented
    March 12, 2009

    Fix blue tinted video in Ubuntu

    September 10, 2010

    Setup SSH access between VirtualBox Host and Guest VMs

    March 8, 2011

    Install GNOME Shell in Ubuntu 10.10 Maverick

    April 4, 2009

    Setup the PS3 Bluetooth Controller on Ubuntu

    October 22, 2008

    How to correctly use LD_LIBRARY_PATH

    Recent Comments
    • Execute command on linux virtual machine (or server) from windows commandline on Setup SSH access between VirtualBox Host and Guest VMs
    • Solved: How to SSH to a VirtualBox guest externally through a host? - Daily Developer Blog on Setup SSH access between VirtualBox Host and Guest VMs
    • How to SSH to a VirtualBox guest externally through a host? [closed] – Code D3 on Setup SSH access between VirtualBox Host and Guest VMs
    • How to copy and paste from VirtualBox? [duplicate] on Setup SSH access between VirtualBox Host and Guest VMs
    • Jackie Laguna on Fix OpenGL: ChoosePixelFormat SketchUp error in WINE
    © 2025 ThemeSphere. Designed by ThemeSphere.

    Type above and press Enter to search. Press Esc to cancel.