• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Issue Plesk 18, Git & Bitbucket Server

FabCoc

New Pleskian
Hi

We host our own bitbucket Server, it works well and we can connect from our computers with ssh and a publickey to the server.

So we tried to add git extension on the plesk server.
Using the URL: ssh://[email protected]:7999/ds/nonamerepo.git

We copied the publickey to the bitbucket server, and try to clone, and then we get:

Code:
Server at 'bitbucket.supsign.tech:7999' is seen for the first time.
Adding its public key to the list of known hosts in '/var/www/vhosts/supsign.dev/.ssh/git_known_hosts_with_port_7999'.
# bitbucket.supsign.tech:7999 SSH-2.0-APACHE-SSHD-2.3.0
# bitbucket.supsign.tech:7999 SSH-2.0-APACHE-SSHD-2.3.0
# bitbucket.supsign.tech:7999 SSH-2.0-APACHE-SSHD-2.3.0
No RSA host key is known for [bitbucket.supsign.tech]:7999 and you have requested strict checking.
Host key verification failed.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.

And it doesn't matter how often we tried, it is still the same message. And it adds every time the host to know_hosts.

Is this problem on plesk or does somebody has git running with bitbucket server?

PS: We uploaded the working computer key to plesk too, same result.
 
Hi,
I actually have the same problem. I use Plesk Onyx 17.8.11 and this is what i get:
Code:
Public key for the server at 'bitbucket.org' is already known in '/var/www/vhosts/robotcodi.com/.ssh/git_known_hosts'.
git clone [email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
I also tried to apply this solution without success.
Connection to remote Bitbucket repository fails on Plesk server: Permission denied (publickey)
The wierd thing is until last week I was using git extension without any problem.
Is there anybody has any idea?
Thank you.
 
Hi,
i solve this problem with this solution:

At the frist step i login to this server with my root-account and login into the account from the customer or webhosting project:
Code:
[root@www2 customer-site.net]# su -m customer123123
bash: /root/.bashrc: Keine Berechtigung
bash-4.2$ pwd
/var/www/vhosts/customer123123.www2.netzfabrik.eu/customer-site.net

Now, i change the directory to "/tmp" to test clone the repo from bitbucket server:
Code:
bash-4.2$ cd /tmp
bash-4.2$ git clone ssh://[email protected]:7999/cst/www.customer-site.net.git
Klone nach 'www.customer-site.net'...
The authenticity of host '[bitbucket.netzfabrik.com]:7999 ([2a07:6fc0:5:0:5:1:64:7]:7999)' can't be established.
RSA key fingerprint is SHA256:O/N7iWnpLsXmzUgfKCk5u6mHeWXrLfZ/FNvAOFd+Wro.
RSA key fingerprint is MD5:68:a2:71:bb:64:ef:27:61:b2:e5:0e:69:c4:02:fb:91.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '[bitbucket.netzfabrik.com]:7999,[2a07:6fc0:5:0:5:1:64:7]:7999' (RSA) to the list of known hosts.
remote: Enumerating objects: 4736, done.
remote: Counting objects: 100% (4736/4736), done.
remote: Compressing objects: 100% (3980/3980), done.
remote: Total 4736 (delta 733), reused 4552 (delta 627)
Empfange Objekte: 100% (4736/4736), 77.71 MiB | 13.03 MiB/s, done.
Löse Unterschiede auf: 100% (733/733), done.
warning: konnte nicht auf '/root/.config/git/attributes' zugreifen: Keine Berechtigung
bash-4.2$

In the last step i replace the file "git_known_hosts_with_port_7999" with the content from known_hosts of the webhosting user/project:
Code:
bash-4.2$ cat /var/www/vhosts/customer123123.www2.netzfabrik.eu/.ssh/known_hosts > /var/www/vhosts/customer123123.www2.netzfabrik.eu/.ssh/git_known_hosts_with_port_7999

After this, i can clone the repo via webinterface perfectly. I tested this solution on my Plesk Server with CentOS 7 and Plesk Obsidian.

Best
Giuliano
 
I had a similar issue with Plesk Obsidian and Github and I manage to resolve it with the help of a support agent from Plesk (through teamviewer). You basically have to delete or rename the id_rsa, id_rsa.pub and known_hosts files from the .ssh folder and recopy any ssh keys to your github account. I hope this can help you.
 
Back
Top