Closed cmoulliard closed 11 months ago
GitHub flow deploying Quarkus app fails due to this auth issue
Error: build-image-deploy : mvn-goals] [ERROR] Caused by: com.google.cloud.tools.jib.api.RegistryAuthenticationFailedException: Failed to authenticate with registry quay.io/snowdrop/quarkus-dev-vm because: 401 UNAUTHORIZED Error: build-image-deploy : mvn-goals] [ERROR] GET https://quay.io/v2/auth?service=quay.io&scope=repository:snowdrop/quarkus-dev-vm:pull,push Error: build-image-deploy : mvn-goals] [ERROR] {"errors":[{"code":"UNAUTHORIZED","detail":{},"message":"Could not find robot with username: *** and supplied password."}]} Error: build-image-deploy : mvn-goals] [ERROR]
The problem is perhaps related to a wrong base64 command used as job works locally using same credentials
encodeAuth=$(echo "${{ secrets.QUAY_USERNAME }}:${{ secrets.QUAY_ROBOT_TOKEN }}" | base64 -w0) cat <<EOF > config.json { "auths": { "quay.io/${{ env.QUAY_ORG }}": { "auth": "$encodeAuth" } } } EOF kubectl create secret generic dockerconfig-secret --from-file=config.json
Fixed after echoing the string without adding a new line echo -n ..... when we generate the Auth base64 string
echo -n .....
Issue:
GitHub flow deploying Quarkus app fails due to this auth issue
The problem is perhaps related to a wrong base64 command used as job works locally using same credentials