Skip to main content

How to clone a private Git repository without cPanel Terminal access?

Comments

15 comments

  • SamuelM
    Hello @2Flow2 Thank you for contacting cPanel! It is indeed necessary to have SSH access in order to access a Git private repository. The "disable_whm_terminal_ui" touch file you referenced is specifically for disabling the embedded terminal emulator inside the WHM or cPanel interfaces. However, even if this is disabled in the interface, it may be possible to login via another standalone SSH client, for example Terminal.app on Mac OS or Putty on Windows. With that said, hosting providers also have the option to disable SSH access altogether for cPanel users. I do not know exactly what policies Godaddy has for SSH access, and it's possible they vary depending upon the hosting package. I did find the following Godaddy documentation, though. This provides instructions for enabling SSH on a Godaddy hosting account:
    0
  • 2Flow2
    Hello @2Flow2 Thank you for contacting cPanel! It is indeed necessary to have SSH access in order to access a Git private repository. The "disable_whm_terminal_ui" touch file you referenced is specifically for disabling the embedded terminal emulator inside the WHM or cPanel interfaces. However, even if this is disabled in the interface, it may be possible to login via another standalone SSH client, for example Terminal.app on Mac OS or Putty on Windows. With that said, hosting providers also have the option to disable SSH access altogether for cPanel users. I do not know exactly what policies Godaddy has for SSH access, and it's possible they vary depending upon the hosting package. I did find the following Godaddy documentation, though. This provides instructions for enabling SSH on a Godaddy hosting account:
    0
  • SamuelM
    If you are using the exact same username and password that were provided in your Godaddy account and you receive the "Access denied" error message, then you likely need to contact Godaddy to ask why you receive the error message. With root access, an administrator at Godaddy should be able to check the SSH access log. If you let them know the time you attempted to login, as well as the username you used and the IP address from which you are connecting, they should be able to easily identify the exact errors logged with these failed login attempts. You can find the IP address you are connecting from by visiting the following URL:
    0
  • 2Flow2
    Alright, I contacted GoDaddy customer support and figured out that you have to use the cPanel username and password (seperate from the GoDaddy username and password) for the SSH to work correctly. After understanding that and successfully logging in, I was able to successfully clone my private repository into my web server using PuTTY! thanks for all your help @cPSamuel ! The one final thing I had a question about is that I noticed even though my site's directory contains a .git folder and can successfully clone from my private Git repository using SSH, the repository still does not show up in cPanel's "Git" Version Control" interface. How do I set it set it so that the cPanel system detects there is a repository in my files? (I want to be able to easily manage my repository/site linkage, like pushing and pulling, from any computer later without having to use an SSH client.) Is it possible to have my Git repository show up in this list, even though it is private?
    0
  • 2Flow2
    Alright, I contacted GoDaddy customer support and figured out that you have to use the cPanel username and password (seperate from the GoDaddy username and password) for the SSH to work correctly. After understanding that and successfully logging in, I was able to successfully clone my private repository into my web server using PuTTY! thanks for all your help @cPSamuel ! The one final thing I had a question about is that I noticed even though my site's directory contains a .git folder and can successfully clone from my private Git repository using SSH, the repository still does not show up in cPanel's "Git" Version Control" interface. How do I set it set it so that the cPanel system detects there is a repository in my files? (I want to be able to easily manage my repository/site linkage, like pushing and pulling, from any computer later without having to use an SSH client.) Is it possible to have my Git repository show up in this list, even though it is private?

    Any word on this, @cPSamuel ? :)
    0
  • cPanelLauren
    The repository as far as I am aware should show up unless it is in one of the directories listed here: Guide to Git" - Host Git Repositories on a cPanel Account | cPanel & WHM Documentation If you use the command line to create the repository in one of these restricted paths the interface will not display the repository
    0
  • 2Flow2
    The repository as far as I am aware should show up unless it is in one of the directories listed here: If you use the command line to create the repository in one of these restricted paths the interface will not display the repository

    This is extremely odd. My path name does not seem to violate any of the stipulations laid out in that Documentation page. The full path to the .git/
    folder is /home/myUsername/public_html/order
    . I can navigate to it in the Terminal and successfully run all the git commands from there (pull, push, etc.) but it doesn't show up in the "Git" Version Control"? Any other ideas?
    0
  • cPanelLauren
    That is odd and maybe it's best if one of our analysts can view the configuration to assist you with it. Can you please open a ticket using the link in my signature? Once open please reply with the Ticket ID here so that we can update this thread with the resolution once the ticket is resolved. Thanks!
    0
  • 2Flow2
    That is odd and maybe it's best if one of our analysts can view the configuration to assist you with it. Can you please open a ticket using the link in my signature? Once open please reply with the Ticket ID here so that we can update this thread with the resolution once the ticket is resolved. Thanks!

    Okay, will do! Thanks!
    0
  • 2Flow2
    That is odd and maybe it's best if one of our analysts can view the configuration to assist you with it. Can you please open a ticket using the link in my signature? Once open please reply with the Ticket ID here so that we can update this thread with the resolution once the ticket is resolved.

    Hi @cPanelLauren ! Sorry about the late response, but I had some issues when trying to create a cPanel support ticket. On the first support ticket page it asks for my "Support Access ID." The two ways it gives to find the Support Access ID are to log in to WHM or to log in to your server from a shell. I tried logging into WHM for my server (by going to /usr/local/cpanel/cpanel -S
    just resulted in the output bash: /usr/local/cpanel/cpanel: No such file or directory
    . Also, /usr/local/cpanel/cpanel -S
    doesn't actually look like a valid command anyway? Is there a command named "cpanel" built-in? Should the hint mistakenly have said /usr/local/cpanel/etc
    ? Either way, it is not helping me find the Support Access ID that I need. What should I do to find my Support Access ID? Thanks!
    0
  • cPanelLauren
    I apologize, I didn't realize you did not have root access to the server. In order to look further into this your hosting provider would need to assist you in this case. There may be some configuration that is present on the server preventing your ability to utilize git properly.
    0
  • 2Flow2
    I apologize, I didn't realize you did not have root access to the server. In order to look further into this your hosting provider would need to assist you in this case. There may be some configuration that is present on the server preventing your ability to utilize git properly.

    Oh, okay. So it may be some configuration by my hosting provider that is causing the cPanel interface to not recognize the git repository present? Because pushing/pulling is working correctly (when I do it manually from the shell), it just is not showing up in cPanel's "Git" Version Control" interface. Thank you!
    0
  • bravonet
    Hi, im new in this forum and im not able to create new topic, that's why im in here posting my question here. im facing difficulties in cloning private repo in cPanel. i've follow the instruction here Guide to Git" - How to Set Up Deployment | cPanel & WHM Documentation but its still failed. below are the steps that i've done, 1. generate SSH key in my local machine. (because cPanel's SSH key generator doesn't allow me to generate key without password) 2. login to my cPanel account & go to SSH Access and import my key into cPanel. 3. change the public key authorization into authorized. 4. deploy public key into my github repo. 5. go to Git" Version Control and insert the details require to clone my private repo. Clone URL: git@github.com/username/repo_name.git (im sure that my username & repo_name is correct) 6. click on the create button. outcome: Error:(XID 6xpzp3) "/usr/local/cpanel/3rdparty/bin/git" reported error code "128" when it ended: fatal: 'git@github.com/username/repo_name.git' does not appear to be a git repository fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. please help.
    0
  • bravonet
    anybody home?
    0
  • cPRex Jurassic Moderator
    Hey there! I searched for other users with this error in our system and in all the ones I found this was related to an issue with the key setup. Can you double-check the key access between GitHub and your server? If that doesn't end up being the issue, troubleshooting Git over a forum can often be messy so this might be a good one to submit a support ticket to our team to have them take a look.
    0

Please sign in to leave a comment.