https://infracost.io logo
g

green-thailand-87645

04/07/2022, 6:07 PM
Copy code
$ infracost comment gitlab --path infracost.json --repo $CI_PROJECT_PATH --merge-request $CI_MERGE_REQUEST_IID --gitlab-token $GITLAB_TOKEN
time="2022-04-07T17:52:21Z" level=info msg="Finding matching comments for tag infracost-comment"
time="2022-04-07T17:52:21Z" level=info msg="Found 0 matching comments"
time="2022-04-07T17:52:21Z" level=info msg="Creating new comment"
Error: Error creating comment: 401 Unauthorized
a

average-dream-1897

04/08/2022, 9:52 AM
same issue here. anyone have suggestion ? im already create project token and personal token full access, still got same error. thanks
c

crooked-daybreak-55253

04/08/2022, 11:36 AM
Are you self-hosting the runner? Sathish needed to pass
--gitlab-server-url
to infracost comment.
Also, can you create comments manually, something like:
Copy code
curl -X POST --header "PRIVATE-TOKEN: redacted" --data-urlencode "body=test" <https://gitlab>.[redacted]/merge_requests/1/notes
6 Views