Hi Team,
Api_token I have created with read and write scope.
I am trying to access private repository using api curl but it is throwing error.
First try using Bearer Auth
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {api_token}'
Error
{
"type": "error",
"error": {
"message": "Token is invalid, expired, or not supported for this endpoint."
}
}
Second Approach (this is working for public repo but not working for private repo)
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Authorization: {api_token}'
Error
{
"type": "error",
"error": {
"message": "You may not have access to this repository or it no longer exists in this workspace. If you think this repository exists and you have access, make sure you are authenticated."
}
}
Please suggest what is the missing parameter to GET PRIVATE REPOSITORY