I was following this guide:https://bitbucket.org/bitbucketpipelines/runners-autoscaler/src/master/
I have things in a state where, when the runner controller pod spins up, it gives me 401 errors:DEBUG: Starting new HTTPS connection (1): api.bitbucket.org:443DEBUG: https://api.bitbucket.org:443 "GET /2.0/workspaces/myworkspace HTTP/1.1" 401 380DEBUG: GET request to https://api.bitbucket.org/2.0/workspaces/myworkspaceDEBUG: Got 401 Client Error: Unauthorized for url: https://api.bitbucket.org/2.0/workspaces/myworkspace. Status: 401✖ Unauthorized. Check your bitbucket credentials. Status code: 401. Login failed due to incorrect login credentials or method.For information on authentication methods for Bitbucket Cloud APIs, visit:https://developer.atlassian.com/cloud/bitbucket/rest/intro/#authenticationIf you are unsure of which login details or login method to use, visit:https://support.atlassian.com/bitbucket-cloud/docs/log-into-or-connect-to-bitbucket-cloud/If I exec into the pod, the username and password variables are correct, and I have tried to use them manually via curl to connect to the https://api.bitbucket.org/2.0/workspaces/myworkspace and that does work successfully.However if I purposely use the wrong password via curl, it spits out the same error. I'm a little stumped as this case isn't covered by the documentation. Any help would be appreciated.
Well... weirdly enough I got it working and I'm not exactly sure why it wasn't to begin with. If you're here with the same problem, regenerate the b64 encoding for the app password. That's really the only thing I changed even though I verified it was right.
@Mike Stanley hi. Happy to know you solved this issue for yourself.There are possible 3 reasons where this could happen:
kubectl apply -f config/runners-autoscaler-secret.yaml
Regards, Igor
I think the encoding was the issue.I usually use:"echo 'password' | base64 -w0"
Typically, this works fine for my purposes. But in this case it wouldn't. It really did need to be:"echo -n 'password' | base64"
It looks like you're new here. Sign in or register to get started.