Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Copilot Lvl 3
Message 1 of 4

##[error]Bad credentials

Solved! Go to Solution.

We're trying to use the svenstaro/upload-release-action in CosmoScout VR. While it works very nicely for our workflows running on Linux, it somehow fails with this error on a Windows host.

 

 ##[error]Bad credentials

 

Here is the error: https://github.com/cosmoscout/cosmoscout-vr/runs/234662696#step:7:8

Here is the according workflow file: https://github.com/cosmoscout/cosmoscout-vr/blob/feature/actions/.github/workflows/release.yml

 

After some testing, it seems that a significant difference between our workflow jobs are the build times: Linux takes only 30 min while Windows requires around 1.5 h. If the build times are lowered artificially, the upload works just fine. Can it be possible that the credentials provided by GitHub expire to quickly?

 

Related issue at the action's repository: https://github.com/svenstaro/upload-release-action/issues/1

 

Edit: Today, after one week, I verified that this issue still persists... Is this a known bug or am I doing something wrong here?

3 Replies
Copilot Lvl 3
Message 2 of 4

Re: ##[error]Bad credentials

This is still an issue...

Solution
Copilot Lvl 3
Message 3 of 4

Re: ##[error]Bad credentials

While I did not get any response yet, I found an official documentation on this issue!

 

The installation access token expires after 60 minutes. GitHub fetches a token for each job, before the job begins.

 

So as a workaround, will use a personal access token instead of `secrets.GITHUB_TOKEN`.

Copilot Lvl 2
Message 4 of 4

Re: ##[error]Bad credentials

The only way to make it work seems to be using a separate job for release creation and pass the files between them via artifacts: https://help.github.com/en/actions/automating-your-workflow-with-github-actions/persisting-workflow-....

 

Which is very inconvenient and a lot of boilerplate!