Private Bitbucket Repositories in Plesk? Plesk doesn’t seem to have permission? I’ll show you where the bug is and how to fix it. In order for Plesk to know that it is the owner of the private repository, SSH key pairs must be exchanged. The key must be in the Plesk and added to your repository. How to do this is explained in this step by step guide.
1. Install Git for Plesk
First you need (logically) the extension “Git” for your Plesk installation. You can find it in Plesk in the left menu under “Extensions”.
2. Add repository to your domain
Now go under the desired domain to “Git” and to “Add Git Repository”. There you choose “Remote Git hosting like GitHub or Bitbucket”.
3. Inserting a Repository Link
The link to your Bitbucket repository must be specified here. It looks like this:
https://USERNAME@bitbucket.org/USERNAME/repo.git. Now we remove the protocol from the link and replace a slash with a colon:
USERNAME@bitbucket.org:USERNAME/repo.git. Now insert the link into the “Remote Git Repository” field. Then your interface should look like this:
4. Share SSH key
A field “Public SSH key” appears. Now we go to our Bitbucket repository, which we want to include. Here we navigate to “Settings -> Access keys”. There we click on “Add key” and insert the key into the field “Key”:
Optionally we can set a label (title). Now click on “Add key”.
5. Adding and Cloning a Repository
Then we can confirm with “OK” in Plesk. Your Plesk should now be able to clone the repository.
It wasn’t that hard, was it? Here are more posts about Plesk, maybe you’ll find something that interests you: