Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing Git with non-root user account

Tags:

git

linux

ubuntu

I've already set up a Git repository on GitHub and committed a few changes from my Windows machine.

But tomorrow I'll have to work in this repository from a machine running Ubuntu with limited privilege (i.e. no sudo).

Is there a portable version of Git for Linux? Or some source that allows me to compile and install Git only for the current user?

like image 293
BoppreH Avatar asked Oct 28 '10 02:10

BoppreH


People also ask

Do I need admin rights to install Git?

Please note: You may need administrator's rights to install the Git software. If you do not have Administrator's rights, please contact your computer support team.

How do I manually install Git?

To install Git, navigate to your command prompt shell and run the following command: sudo dnf install git-all . Once the command output has completed, you can verify the installation by typing: git version .

Why Git is not installed?

Make sure you are in the correct directory. Show activity on this post. Install git and tortoise git for windows and make sure it is on your path, (the installer for Tortoise Git includes options for the command line tools and ensuring that it is on the path - select them).


2 Answers

You can download the git source and do ./configure --prefix=/home/user/myroot && make && make install to install git to your home directory provided you have the build tools. If you don't have the build-essential package installed (dpkg --list|grep build-essential), you will need to install those to your home directory as well.

like image 144
Scott Avatar answered Oct 06 '22 06:10

Scott


I don't like link-only answers, but this link I followed step-by-step on a Fedora machine and it worked without modification. Very, very easy. The binaries end up in your ~/bin directory. You download a tarball, extract the sources, run make and run make install and that is it.

As the author states, the 2 prerequisites are gcc and ssh and if you meet these git should work for you as a non-root user.

like image 28
demongolem Avatar answered Oct 06 '22 07:10

demongolem