I'm following a Godaddy help tutorial in order to install Let's Encrypt certificate for my website. So I connected to my server using ssh via Putty.

Typing the command sudo git clone https://github.com/letsencrypt/letsencrypt gives me get the error -bash: sudo: command not found.

After typing cat /proc/version I found that I have a Red Hat dist, so what should I do?

  • Is git installed? What is the output of which git?
    – clk
    Jun 25, 2016 at 1:45
  • the output is : /usr/bin/git when installing git using the tutorial fr.godaddy.com/help/… I modified the file ~/.bash_profile manually using cat >> so I think it's the problem.
    – Hamza
    Jun 25, 2016 at 1:49
  • 2
    What about which sudo? If it's not there, it may need to be installed: cyberciti.biz/faq/…
    – clk
    Jun 25, 2016 at 1:52
  • 2
    If you do not wish to install sudo, just become root and run the commands.
    – fpmurphy
    Jun 25, 2016 at 2:14
  • 2
    What is their reason for wanting people to run git clone as root anyway? I can't imagine why that would ever be necessary.
    – user41515
    Jun 25, 2016 at 16:42

3 Answers 3


To resolve the error message, you may need to install sudo using the steps below. Alternatively, you could run the command after logging in with the root account using su -.

To install sudo:

Log in with the root account using su -. Then, yum install sudo.

After that is installed, add the user's account to the /etc/sudoers file.

After the following line:

## Allow root to run any commands anywhere
root    ALL=(ALL)       ALL

Append this line:

user ALL=(ALL) ALL

See here for more info.

  • even su or yum gives the same error, P.S: I typed ls /bin and I didn't find su or sudo
    – Hamza
    Jun 25, 2016 at 2:30
  • Perhaps this will solve the issue? fr.godaddy.com/help/…
    – clk
    Jun 25, 2016 at 2:35
  • @Hamza sudo is installed in an sbin directory and not the bin directory. You will have to search either /sbin or /usr/sbin. In either case can you paste the output of which su
    – prateek61
    Jun 25, 2016 at 2:42
  • which su gives no output, and checked the 2 dirs but no presence of su or sudo.
    – Hamza
    Jun 25, 2016 at 2:45
  • Did you try enabling admin/root access in the Godaddy control panel, according to the previous link?
    – clk
    Jun 25, 2016 at 2:46

Sudo is a popular command for raising a normal user's privileges.

I'd guess that you are logging in directly as root, in which case there's no need to use sudo - everything you do is already sudoed, effectively.

  • My server in Godaddy is a shared hosted server, after asking I found that I can't have the root access to the server.
    – Hamza
    Jun 25, 2016 at 15:06
  • 2
    No root access : Then please never use sudo . Not required for git clone https://github.com/letsencrypt/letsencrypt . Jun 25, 2016 at 17:06

To highlight Knud Larsen's (and other users) comment, sudo isn't required here. You can use git when logged into GoDaddy's SSH without sudo.

In PuTTY, simply use:

git clone https://github.com/letsencrypt/letsencrypt

That being said, actually installing Let's Encrypt also requires sudo level access further along the process which is not granted to shared accounts. I have yet to find a workaround to have Let's Encrypt work at all on a GoDaddy Shared account. Off to a better host I go.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .