Git-Auto-Deploy icon indicating copy to clipboard operation
Git-Auto-Deploy copied to clipboard

Bitbucket config was bug

Open adthonb opened this issue 6 years ago • 1 comments

If I set option in config.json with :

"repositories": [
   {
      "url": "ssh://[email protected]:{username}/myrepository.git
   }

It will show error like this: (I can't first clone with this config too)

2018-04-05 09:33:03,291 [INFO ] Branch master set up to track remote branch master from origin. 2018-04-05 09:33:03,291 [INFO ] Your branch is up-to-date with 'origin/master'. 2018-04-05 09:33:03,291 [INFO ] Reset branch 'master' 2018-04-05 09:33:03,313 [INFO ] Repository /usr/share/nginx/html/xxx successfully initialized 2018-04-05 09:33:03,327 [CRITI] Unable to activate SSL: File does not exist: /home/ec2-user/cert.pem 2018-04-05 09:33:03,346 [INFO ] Listening for connections on http://0.0.0.0:8080 2018-04-05 09:33:07,907 [INFO ] Incoming request from 104.192.142.195:15405 2018-04-05 09:33:07,907 [INFO ] Handling the request with BitBucketRequestParser 2018-04-05 09:33:07,908 [WARNI] The URLs references in the webhook did not match any repository entry in the config. For this webhook to work, make sure you have at least one repository configured with one of the following URLs; [email protected]:{username}/myrepository.git, https://bitbucket.org/{username}/myrepository.git 2018-04-05 09:33:07,908 [INFO ] 0 candidates matches the request 2018-04-05 09:33:07,908 [INFO ] 104.192.142.195 - code 400, message Bad request 2018-04-05 09:33:07,908 [INFO ] 104.192.142.195 - "POST / HTTP/1.1" 400 - 2018-04-05 09:33:07,908 [ERROR] No matching projects

BUT If set option with :

"repositories": [
   {
      "url": "ssh://[email protected]/{username}/myrepository.git
   }

It will show error like this: 2018-04-05 09:35:51,110 [INFO ] Initializing repository /usr/share/nginx/html/xxx 2018-04-05 09:35:51,224 [INFO ] ssh: Could not resolve hostname bitbucket.org:{username}: Name or service not known 2018-04-05 09:35:51,224 [INFO ] fatal: Could not read from remote repository. 2018-04-05 09:35:51,224 [INFO ] Please make sure you have the correct access rights 2018-04-05 09:35:51,224 [INFO ] and the repository exists. 2018-04-05 09:35:51,224 [ERROR] Command 'git fetch origin' failed with exit code 128

adthonb avatar Apr 05 '18 09:04 adthonb

Don't use ssh://. Simply add [email protected]/{username}/myrepository.git and it should work. This should fix the URL mismatch error.

rehmatworks avatar May 04 '18 16:05 rehmatworks