Answer the question
In order to leave comments, you need to log in
How to get content from private bitbucket repository using key:secret pair?
In general, there is a private repository, there is an OAuth user, the task is to get the content of a file from a private repository, the OAuth user has read access to projects.
Request api https://developer.atlassian.com/bitbucket/api/2/re...
Request code
if ($curl = curl_init())
{
curl_setopt_array($curl, array(
CURLOPT_URL => <API_PATH>,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_USERPWD, sprintf("%s:%s", self::CLIENT_ID, self::SECRET)
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
}
Access denied. You must have write or admin access.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question