Title
#general
s

sravanthi

06/01/2022, 10:15 AM
infracost comment bitbucket --repo apato-platform --commit 4709b78 --path /home/sravanthi/infracost-base.json --behavior delete-and-new --bitbucket-token $BITBUCKET_TOKEN --behavior update Error: Error getting comments: 401 Unauthorized
Hugo (Infracost)

Hugo (Infracost)

06/01/2022, 10:16 AM
hey @sravanthi
10:18 AM
from a quick glance at this the
--repo apato-platform
looks like it might be wrong. It seems that you’re missing the bitbucket workspace. e.g.
workspace/apato-platform
10:21 AM
FYI you’re also specifying
--behavior
twice
s

sravanthi

06/01/2022, 10:22 AM
@Hugo (Infracost) infracost comment bitbucket --repo adesso-as-a-service/Apato GMBH/apato-platform --commit 4709b78 --path /home/sravanthi/infracost-base.json --behavior delete-and-new --bitbucket-token $BITBUCKET_TOKEN --behavior update Error: Error getting comments: 401 Unauthorized
10:22 AM
same error
Hugo (Infracost)

Hugo (Infracost)

06/01/2022, 10:27 AM
Is the
$BITBUCKET_TOKEN
correctly scoped? @sravanthi can you try this curl request to see if you get a successful response?
export BITBUCKET_REPO=xxx/xxx
export BITBUCKET_TOKEN=xx:xxx

curl \
-H 'Accept: application/json' \
-u $BITBUCKET_TOKEN \
<https://api.bitbucket.org/2.0/repositories/$BITBUCKET_REPO/commit/4709b78>