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:443
DEBUG: https://api.bitbucket.org:443 "GET /2.0/workspaces/myworkspace HTTP/1.1" 401 380
DEBUG: GET request to https://api.bitbucket.org/2.0/workspaces/myworkspace
DEBUG: 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/#authentication
If 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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.