Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4625106
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T03:13:29+00:00 2026-05-22T03:13:29+00:00

So I’m using GIT, trying to push code to my remote server. on a

  • 0

So I’m using GIT, trying to push code to my remote server.

  • on a shared unix hosting, and I’m not allowed to have my own environment variables (blocked for SSH accounts) and no sudo access.
  • managed to install git successfully in my /home/
  • trying to push code to the server returns : bash: git-upload-pack: command not found
  • $PATH variable is set – because git is installed in my /home/
  • to get things working, I had to use to following clone command :

    git clone -u /home/bin/git-upload-pack user@server.com:mygitfolder

  • same versions of git on local machine/remote server (1.7.0.4)

so from what I can gather, I need to basically :

  • find a way to either wrap my environment variable every time I push to the server
    or
  • specify the path of my git-receive-pack while pushing to the server

I understand I could create a hook that would take effect as I push, but have not managed to find where/how this is implemented.

(I would rather not create an alias on my local machine)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T03:13:30+00:00Added an answer on May 22, 2026 at 3:13 am

    If you can not adjust the effective PATH on the remote side1, then you will have to specify the location of the programs from your local side.

    As you found, git clone can be given -u /path/to/git-upload-pack (or --upload-pack /path/to/git-upload-pack).

    git fetch and git pull accept --upload-pack /path/to/git-upload-pack (not -u, however, since it means something else to these programs). They also check the remote.<name>.uploadpack configuration variable.

    git push accepts --receive-pack /path/to/git-receive-pack and checks the remote.<name>.receivepack configuration variable.

    Once you have your repository cloned, you can use the configuration variables to record the paths:

    git clone -u /home/bin/git-upload-pack user@server.com:mygitfolder
    cd mygitfolder
    git config remote.origin.uploadpack /home/bin/git-upload-pack
    git config remote.origin.receivepack /home/bin/git-receive-pack
    

    Then you can push, fetch, or pull without having to specify the path.


    1
    You said that “environment variables [are] blocked for SSH accounts”. If you mean that the sshd has its PermitUserEnvironment setting turned off (meaning that you can not use environment="PATH=/home/bin:/usr/bin:/bin" in your .ssh/authorized_keys file), then you still might be able to modify your default PATH via a shell initialization file (e.g. .bashrc).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I am trying to loop through a bunch of documents I have to put
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
Is it possible to replace javascript w/ HTML if JavaScript is not enabled on
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I'm making a simple page using Google Maps API 3. My first. One marker
We're building an app, our first using Rails 3, and we're having to build
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.