Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to clone github private repository in cpanel (shared host without terminal or ssh)?

Tags:

github

ssh

cpanel

I have a shared host and they don't give me ssh or terminal for it. I've tried to clone my private repos from git by Git™ Version Control so I am using ssh link because they need permission. I don't know how to make ssh key on cpanel so I can make it from my mac and upload to cpanel and also add to Github.

But when running, they give me error: Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists..

I'm a beginner for using Git & StackOverflow, so please let me know if there's anything wrong with the question I've asked. Thanks!

Tried Url with password Cloning a private Github repo and having a response "The clone URL cannot include a password."

like image 590
Hùng Nguyễn Avatar asked May 14 '19 09:05

Hùng Nguyễn


People also ask

Can I clone private GitHub repo?

You also have the option to clone a private GitHub repository using SSH. To do this, you need to start by generating an SSH keypair on your local device. Then add a public key to your GitHub account. This gives you the ability to connect your local device with GibHub using a secure channel over an unsecured network.


1 Answers

This is different than what worked for the OP (hopefully they put their solution in an answer here).

I was able to solve this problem by installing an external SSH client (like PuTTY for Windows) and then SSH into my website using its IP address. Then I followed these steps from cPanel to connect the private repository.

like image 74
Guy Avatar answered Oct 01 '22 16:10

Guy