Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

niho's avatar
Level 2

Forge not working with bit bucket

Hi,

I have a problem linking my forge account with Bit Bucket.

i have added it via the forge UI and it seems to have authenticated fine with my bit bucket account and installed intially from my repo.

However whenever I try to push some updated code it fails to deploy and recieve this message via forge.

'''Permission denied (publickey).

fatal: Could not read from remote repository.

Please make sure you have the correct access rights and the repository exists.'''

Are there other permissions that need to be set via bit bucket or am i missing something?

I have found old threads but nothing mentioned seems to have solved the issue.

Thanks

0 likes
5 replies
niho's avatar
Level 2

Someone must have expereinced this issue? Anyone?

Nash's avatar
Nash
Best Answer
Level 20

Have you added Forge's public SSH key to your Bitbucket settings? You can view the key on your server by typing: cat ~/.ssh/id_rsa.pub

1 like
niho's avatar
Level 2

Not that im aware of. Thanks I will try that!

niho's avatar
Level 2

Just to clarify the answer.

I copied over the SSH key already located on my server as @nash mentioned and create a key in my bit bucket account.

This then resolved the problem. This isn't located in any documentation in terms of forge from what I can see so hope this helps someone.

1 like
MladenJanjetovic's avatar

Just to mention, use SSH link on Bitbucket, not HTTPS. That one is in format suitable for Laravel Forge

Please or to participate in this conversation.