Authentication required errors

Starting yesterday I seem to be getting an error when building a container on resin. I had built older versions without issues, but today it seems that I can no longer push to one of my apps. I get the below when building:

[Build]    Step 14 : COPY . .
[Build]     ---> 19060d4bce57
[Build]    Removing intermediate container 77e357d0e564
[Build]    Step 15 : CMD /usr/src/app/
[Build]     ---> Running in 3e0a464cb4a2
[Build]     ---> df77368312b3
[Build]    Removing intermediate container 3e0a464cb4a2
[Build]    Successfully built df77368312b3
[Success]  Image created successfully
[Info]     Verifying image integrity...
[Success]  Image passed integrity checks!
[Info]     Uploading image to registry...
[===============>                                   ] 30%[Error]    Build failed: unauthorized: authentication required

remote: error: hook declined to update refs/heads/master

I can’t seem to find anyone else who has had this issue with resin before

hey @justin8, Have you tried restarting your build to see if the error still persists?

@cameron, @lifeeth Do you have any ideas what might cause this?

@nghiant2710 I had this error twice yesterday, and today I made a second app and pushed it to that and received the same error again.

It does take a long time to build, I’m wondering if there is some kind of timeout issue happening?

@justin8 we found the reason for the issue. Since your build is quite long, takes > 4 hours so the access token to upload the image to the registry is expired because it’s valid for just 4 hours.

The PR to fix this issue will be merged soon, we’re sorry for the inconvenience.

1 Like