• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Issue git ssh subdomain is already known in error

Mehmet

New Pleskian
Hi,
I've 2 different projects on Bitbucket. Im trying to pull 2 different projects in a domain and subdomain for same domain.
I've added git successfully for subdomain.
When i try to add for domain i get error. subdomain is live thats why i don't want to change anything with related git connection. ssh folder is n root folder of domain. That causes the problem i guess. Is there a workaround ?
Error:

Deploying files to example.com
  • Cloning into bare repository '/var/www/vhosts/example.com/git/example.com.git'...
  • Public key for the server at 'bitbucket.org' is already known in '/var/www/vhosts/example.com/.ssh/git_known_hosts'.
  • Warning: Permanently added the RSA host key for IP address '2401:1d80:1010::151' to the list of known hosts.
  • Permission denied (publickey).
  • fatal: Could not read from remote repository.
  • Please make sure you have the correct access rights
  • and the repository exists.
 
Hi all,

Same problem than Mehmet:
2 different projects on gitLab. Im trying to pull 2 different projects in a domain and subdomain for same domain.
The same key is generated by Plesk git.

Is there a solution?
 
Hi,
Deploying files to example.com
  • Cloning into bare repository '/var/www/vhosts/example.com/git/example.com.git'...
  • Public key for the server at 'bitbucket.org' is already known in '/var/www/vhosts/example.com/.ssh/git_known_hosts'.
  • Warning: Permanently added the RSA host key for IP address '2401:1d80:1010::151' to the list of known hosts.
This is not an error. It only tells you that ssh already knows (and trusts) the git server's key. There will be an error should the server's key not match, to protect you from MitM attacks (a rogue server pretending to be the one you want to connect to).

  • Permission denied (publickey).
This is the source of the problem: The server you want to connect to does not like your ssh key because it is not in its list of acceptable keys.
Possible reasons:
  • you have not yet generated a key pair (and added its public key to the user's authorized_keys list on the bitbucket server)
  • you are using the wrong key pair (it should be in /var/www/vhosts/example.com/.ssh/, probably id_rsa[.pub], maybe git_id_rsa[.pub] )
  • you are trying to authenticate with username/password only when the server only accepts authentication by key pair and has passwords switched off
  • you are trying to connect to the wrong user account
 
?
The server you want to connect to does not like your ssh key because it is not in its list of acceptable keys.
It doesn't like the key because it says this is the same than another project.... and we can not add the key.
 
No, those two messages are unrelated.

ssh authenticates in both directions:
First, the ssh server is authenticated using the ssh server's private key and your saved public key in the known_hosts file.
Then, you authenticate against the server with your private key and the public key stored in authorized_keys on the ssh server.

The first message contains a known_hosts, so it means you already know, and can verify, the identity of the ssh server. This is not an error, it is normal.

The actual error "Permission denied (publickey)" occurs when the other direction fails, where the ssh server wants to know your identity.
Is there a key pair in /var/www/vhosts/example.com/.ssh/?
 
2021 still the same problem, it creates only for the subscription and not per domain the .ssh folder, that's why it's reusing the same ssh for all my domains and it doesnt work, any workaround?
 
Hi Igor. Thank you for the suggestion. I will do it for one case. We manage 7 servers All do the same except one (because only uses one repo from git hub) it happens on GitHub and bitbucket. When I searched this found that I am not alone. Waited couple months. Will report to see where this goes. But I must say it is a disappoint.
 
I solved add the IPs of bitbucket on firewall rule

Tootls & Settings > Firewall > Modify Plesk Firewall Rules

Incoming
port TCP 22

Sources: [IPS from atlassian]
google it to take the list
 
Back
Top