I was trying to auto deploy code on server but I am getting below error in webhook log:
repository access denied. deployment key is not associated with the requested repository. fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
I have already add my server public SSH key to the BitBucket and it's working fine if i run 'git pull' command in project directory.
I have set webhook as follow in BitBucket:
URL: http://IP-address/project-folder/hook/deploy.php
Status: Active (checked)
SSL / TLS: Skip certificate verification (checked)
Triggers: Repository push (selected)
deploy.php:
<?php
echo shell_exec("git pull 2>&1");
After commit / push code locally I got above error in webhook log.
Can anyone help me to resolve this issue? Any help would be appreciated.