That GoDaddy! tutorial seems a bit odd in my humble opinion. There is utterly no reason to use sudo
with git
since all Git is really is a version control system. So I believe your core problem is Git is not installed on your system to begin with. To solve that just connect to your server via SSH and run this command:
sudo yum install git-all
Then once Git is installed try running this command to clone the “Let’s Encrypt” tutorial; same command as their first command but without sudo
:
git clone https://github.com/letsencrypt/letsencrypt
The follow the rest of the instructions on that tutorial and I’m pretty sure you will be fine.
UPDATE: Also, looking at those GoDaddy! Git installation instructions you provided—which explains an incredibly over-complex way to install Git— it’s easy to see how you could have overwritten your default ~/.bash_profile
. Honestly the GoDaddy! instructions seem like they are designed to create more problems than they solve. So it’s best to undo that mess.
And if you overwrote your default ~/.bash_profile
—or set it to something odd/complex—it’s easy to see how it could screw up your setup to the point it’s impossible for the system to be able to find a basic command like sudo
.
So I would recommend moving ~/.bash_profile
to a backup file so you still have it but it’s not active like this:
mv ~/.bash_profile ~/.bash_profile.bak
After that is done, log back in and type in the following command:
which sudo
The output of that should be something like this:
/usr/bin/sudo
Which now means your PATH
settings are fine and back to normal.
Now, to get rid of that odd Git version GoDaddy! instructed you to install by doing this. First, just get back to your home directory like this:
cd ~/
Then run this command:
rm -rf ~/opt/usr/bin/git --version
Then logout and log back in and then things should be fine. With that cleaned up, use Yum to install Git and you should be good to go!
1
sudo isn't automatically installed or configured for many distros by default. if you set a root password during install, just use
– Frank Thomas – 2016-06-25T04:08:25.040su
and authenticate as the root user to run commands as root, or install and configure sudo. http://unix.stackexchange.com/questions/55818/how-to-use-sudo-in-fedora