https://infracost.io logo
#general
Title
# general
s

straight-stone-45632

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
m

mysterious-teacher-68276

06/01/2022, 10:16 AM
hey @straight-stone-45632
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
FYI you’re also specifying
--behavior
twice
s

straight-stone-45632

06/01/2022, 10:22 AM
@mysterious-teacher-68276 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
same error
m

mysterious-teacher-68276

06/01/2022, 10:27 AM
Is the
$BITBUCKET_TOKEN
correctly scoped? @straight-stone-45632 can you try this curl request to see if you get a successful response?
Copy code
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>
23 Views