Description
Mantis 1.2.17, Source Control Integration 0.18, BitBucket Integration 0.18 on a private GIT repository.
Config:
URL https://bitbucket.org/meigallodixital/myapp.com
array(5) {
["bit_basic_login"]=> string(8) "meigallodixital"
["bit_basic_pwd"]=> string(9) "password"
["bit_username"]=> string(8) "meigallodixital"
["bit_reponame"]=> string(9) "myapp.com"
["master_branch"]=> string(7) "master"
}
On import all:
SYSTEM WARNING: 'First parameter must either be an object or the name of an existing class' in '/home/desarrollo/sites/mantis.meigallodixital.com/web/plugins/SourceBitBucket/SourceBitBucket.php' line 255
SYSTEM WARNING: 'First parameter must either be an object or the name of an existing class' in '/home/desarrollo/sites/mantis.meigallodixital.com/web/plugins/SourceBitBucket/SourceBitBucket.php' line 260
Retrieving master ... failed.
Activity
sverhagen commentedon Aug 2, 2015
This particular problem seems to be caused by the URL being malformed, which is due to the parameters being wrong. I figured this out by putting the following on line 254:
I could then see the URL in my
php.log
. That was helpful for me because it made me understand that it's talking to the Bitbucket API: "https://bitbucket.org/api/2.0/repositories/bit_username/bit_reponame/commits/master
".It turned out that I had used my repository name, instead of the repository slug. The name might by something like "My Repository", in which the case would be "my-repository". If you look at the normal Git "clone" URL, you'd find that it looks something like this: "
https://bit_basic_login@bitbucket.org/bit_username/bit_reponame.git
". And, of course, your problem may be different than mine. FYI, I end up leaving the URL empty for now.sverhagen commentedon Aug 2, 2015
Another problem that I'm noticing, and this may be not so much a problem in production, but I have been heavily debugging this plugin, is that I'm hitting Bitbucket's rate limits:
The above message shows up in my PHP log when changing
SourceBitBucket.php
as follows:Since the above message isn't JSON, like normal responses, it doesn't get parsed as such, and the script trips over that at the same line 255.