Wednesday, 27 May 2026
  1 Replies
  50 Visits
1
Votes
Undo
How can I setup access for multiple private repositories in Cpanel?

I've tried many tutorials and documentation. Here is one of them: https://docs.cpanel.net/knowledge-base/web-services/guide-to-git-set-up-access-to-private-repositories/

But I'm always got this error:


Permission denied (publickey). fatal: Could not read from remote repository.


It seems like we can only use the default name (id_rsa). I've tried this code:


ssh-keygen -t rsa -b 4096 -C "username@example"

It works fine. But it will generate the default (which is id_rsa). This means that we can't deploy multiple private repos, right? Because we can only use "id_rsa".

So is it possible to create an ssh key without a default name? Also, how to create multiple private repos in Cpanel?
1 week ago
·
#644
1
Votes
Undo
That is what the documentation you are referring to mentions.

Set up access to multiple repositories
To create an SSH key for each of your repositories, follow the steps outlined above.
After you have added the keys to the remote repositories, create a local ~/.ssh/config file to alias each of the keys to their corresponding repository names.

For example, if you have two repos configured on GitHub, testing and testing2, and both your cPanel and GitHub usernames are cptest, create or modify the ~/.ssh/config file with these contents:


Host testing.github.com
Hostname github.com
IdentityFile /home/cptest/.ssh/testing
User git

Host testing2.github.com
Hostname github.com
IdentityFile /home/cptest/.ssh/testing2
User git

Compared to their documentation, I would use:

IdentityFile /home/cptest/... (instead of IdentityFile=...)
User git
a FQDN-like Host entry: xxx.yyy.com
That way, the URL becomes: git clone testing.github.com:me/myRepo

If the cPanel requires a valid protocol, use:


ssh://github.com-testing/me/myRepo
^^^^^^ ^^^
(valid protocol) (/, not :)

In your case:


ssh://top25vineyards.github.com/me/myRepo
ssh://top25vineyards.github.com/Penk13/top25vineyards

(to mimic an fully-qualified domain name)
  • Page :
  • 1
There are no replies made for this post yet.
Submit Your Response
© 2026 hostsocial.io