Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remote Configuration in Bitbucket private repo returns 403 #267

Open
capitanh opened this issue Nov 23, 2021 · 2 comments
Open

Remote Configuration in Bitbucket private repo returns 403 #267

capitanh opened this issue Nov 23, 2021 · 2 comments

Comments

@capitanh
Copy link

I'm keeping elastic agent configuration in a bitbucket private repo to use the "remote file" option set as:
https://[USERNAMER]:[APP_PASSSWORD]@api.bitbucket.org/2.0/repositories/[WORKSPACE]/[REPO]/src/master/[FILENAME]
but keep getting a 403-Forbidden response. When I run this exact same request from curl, it works perfectly fine and the remote file is retrieved. Am I doing something wrong or is there a better way of getting remote pod configurations for elastic agents?
Thanks for your help

@arvindsv
Copy link
Member

Took a quick look and it just uses FileUtils.copyURLToFile. Might be worth checking to see if a non-private URL works.

Looking around, it might be that FileUtils.copyURLToFile doesn't accept a username:password like that in the URL: https://stackoverflow.com/questions/46259498/fileutils-copyurltofile-basicauthenication

@capitanh
Copy link
Author

I can confirm that a non-private (public) repo works fine...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants