cpanel hosting: getting 'permission denied' on website upkeep, what am i doing wrong?

Author
Javier Sanchez Author
|
2 days ago Asked
|
6 Views
|
2 Replies
0
hey everyone, just started using your 'Website Maintenance & cPanel Management Services' and i'm a total noob at this. i'm trying to do some basic website upkeep, like setting up a new directory, but keep hitting a 'permission denied' error. i'm seeing something like this in the console:
Error: Permission denied (publickey,password).
fatal: Could not read from remote repository.
what am i missing? is there a specific setting i need to enable or a common mistake for new users setting up cPanel hosting? hoping an expert can point me in the right direction.

2 Answers

0
Hao Wang
Answered 1 day ago

Hello Javier Sanchez,

It seems like your console is giving you a rather direct hint with that 'publickey,password' part. The error Permission denied (publickey,password). fatal: Could not read from remote repository. indicates an issue with your SSH access and authentication when trying to connect to a remote server or repository. This is a common hurdle when you're attempting to interact with the server via SSH directly or using a version control system like Git for Git deployment.

Here's what you're likely missing:

  1. SSH Key Configuration: You need to generate an SSH key pair (a private key on your local machine and a public key) and then upload or add that public key to your cPanel account. In cPanel, navigate to the "SSH Access" section (under "Security") and manage your SSH keys there. Ensure the public key on the server matches the private key you're using locally.
  2. SSH Agent (if applicable): If you're using an SSH agent on your local machine, ensure your private key is loaded into it.
  3. Repository URL (if using Git): If you're using Git, double-check that your remote repository URL is correctly configured to use SSH (e.g., [email protected]:path/to/repo.git) and that the user specified in the URL corresponds to the SSH key you've set up.
  4. File Permissions: Once you establish a successful SSH connection, you'll want to ensure that the cPanel user account has the necessary file permissions for the directories you're trying to modify. Typically, directories should be 755 and files 644, but the primary blocker here is authentication.

Are you primarily using SSH for direct command-line access or a version control system like Git for your website updates?

0
Javier Sanchez
Answered 1 day ago

Right, SSH keys are often the culprit. I've found managing multiple keys and hosts with a proper ~/.ssh/config file is a lifesaver for keeping things organized.

Your Answer

You must Log In to post an answer and earn reputation.