Results 1 to 9 of 9

Thread: Bluehost - Solution to the Git PATH issue when using a non interactive shell

  1. #1
    Join Date
    Apr 2010
    Posts
    1

    Smile Bluehost - Solution to the Git PATH issue when using a non interactive shell

    Hi,

    I have noticed that a lot of people are having issues in using Git after the SSH upgrade done by bluehost.

    I just though of posting my solution to this issue, so that someone might benefit from it.

    Use the following commands to add these configuration parameters

    On Linux
    -----------
    git config remote.origin.uploadpack '/home/<user name>/bin/git-upload-pack'

    git config remote.origin.receivepack '/home/<user name>/bin/git-receive-pack'

    On Windows
    --------------
    git config remote.origin.uploadpack 'libexec/git-core/git-upload-pack'

    git config remote.origin.receivepack 'libexec/git-core/git-receive-pack'

    After these configuration parameters have been entered, you should be able to use Git as before.

  2. #2
    Join Date
    May 2010
    Posts
    1

    Default Cloning git repo

    The above solution works well, but assumes you already have a local git repo that is tracking a remote repo on Bluehost. Cloning a repo will fail with the same error.

    To clone a Bluehost-based git repo from scratch, you can issue the following command:

    Code:
    git clone -u /home/<user>/bin/git-upload-pack <user>@<host>:/home/<user>/<path-to-repo>
    Then make sure to set your remote uploadpack and receivepack commands per the above message.

  3. #3
    Join Date
    Feb 2009
    Posts
    5

    Default

    Indeed, I've been using the same solution.

    I'm one annual billing cycle away from ditching Bluehost over this, however. Such a hassle.

  4. #4
    Join Date
    Aug 2006
    Location
    Ontario, Canada
    Posts
    6

    Default And for Windows

    And just to expand on tomatohater explanation for those windows users out there

    Code:
    git clone -u libexec/git-core/git-upload-pack <user>@<host>:/home/<user>/<path-to-repo>
    Mind you the path to git-upload-pack might be different. I tried the command

    Code:
    which git-upload-path
    
    /home/<user>/bin/git-upload-pack
    This path didn't actually work for me but I knew where I installed git.

  5. #5
    Join Date
    Oct 2010
    Posts
    1

    Post additional trouble with capistrano

    Setting up the .git/config with the Path to the git-upload and receive packs enables you to git push/pull/clone etc from shell to bluehost´s servers. Nice post!

    Yet still you get errors deploying with capistrano after cap deploy where it calls the "git ls-remote"

    executing `deploy:cold'
    executing `deploy:update'
    transaction: start
    executing `deploy:update_
    updating the cached checkout on all servers
    git ls-remote <username>@<domain>:/<path-to-repo> HEAD
    bash: git-upload-pack: command not found

    It seems that you will have to tell capistrano where the git upload/recieve-packs are.

    has anyone solved this or seen the same error?

    Cheers,
    Karsten

  6. #6
    Join Date
    Aug 2010
    Posts
    2

    Default

    Oh yes. Same error and after hours of trying to resolve it, no solution. Still get:

    git ls-remote <username>@<domain>:/<path-to-repo> HEAD
    bash: git-upload-pack: command not found

    Going to abandon capistrano and clone the repository on the server for deployment.
    Last edited by wbreeze; 01-15-2011 at 10:46 AM.

  7. #7
    Join Date
    Feb 2011
    Posts
    2

    Question Still having the same issues

    I'm still having the same error:

    git push web +master:refs/heads/master
    bash: git-receive-pack: command not found
    fatal: The remote end hung up unexpectedly
    I based my setup on this tutorial

    My local git-config is as follows:

    [core]
    repositoryformatversion = 0
    filemode = true
    bare = false
    logallrefupdates = true
    ignorecase = true
    autocrlf = false
    [remote "web"]
    url = ssh://<username>@domain.com/home/<username>/website.git
    fetch = +refs/heads/*:refs/remotes/web/*
    [remote "origin"]
    uploadpack = /home/<username>/git/bin/git-upload-pack
    receivepack = /home/<username>/git/bin/git-receive-pack
    website.git resides in /home/<username>/website.git

    Anyone knows what goes wrong?

    Kind regards

  8. #8
    Join Date
    Feb 2011
    Posts
    2

    Default

    Still no solution. Emailed bluehost and they verified that .bashrc or .bash_profile isn't read with an non-interactive ssh session.

  9. #9
    Join Date
    Apr 2011
    Posts
    1

    Cool Re: "To clone a Bluehost-based git repo from scratch"

    Thank you very much for this information. I had just cloned two other accounts of mine at other webhost servers and had no issues until Bluehost. When I asked support they guided me here. Thanks again, invaluable to my new development workflow.



    Quote Originally Posted by tomatohater View Post
    The above solution works well, but assumes you already have a local git repo that is tracking a remote repo on Bluehost. Cloning a repo will fail with the same error.

    To clone a Bluehost-based git repo from scratch, you can issue the following command:

    Code:
    git clone -u /home/<user>/bin/git-upload-pack <user>@<host>:/home/<user>/<path-to-repo>
    Then make sure to set your remote uploadpack and receivepack commands per the above message.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •