Good day to all.
Hope somebody can help with the following issue.
I'm trying to get pipelines going on a go project with one dependency. Both repos are private. When the pipeline tries to execute a go get -v, I'm getting the following error:
+ go get -v
# cd .; git ls-remote https://bitbucket.org/asklepio/cloud-server-common
fatal: could not read Username for 'https://bitbucket.org': terminal prompts disabled
# cd .; hg identify -- https://bitbucket.org/asklepio/cloud-server-common
abort: http authorization required for https://bitbucket.org/asklepio/cloud-server-common
go: bitbucket.org/asklepio/cloud-server-common@v1.1.1: reading https://api.bitbucket.org/2.0/repositories/asklepio/cloud-server-common?fields=scm: 403 Forbidden
server response: Access denied. You must have write or admin access.
I added a ssh key to the main project and the public portion to access keys of the dependent project, as suggested by some post on the internet, but I keep getting the error.
There is a similar unanswered question from 2018: https://community.atlassian.com/t5/Bitbucket-questions/permissions-problem-using-go-project-and-pipelines/qaq-p/729891.
Best regards,
Adolfo
you can add a "App Password" and then add it in your pipeline or docker...
git config --global url."https://${PIPELINE_USER}:${PIPELINE_APP_PASSWORD}@bitbucket.org".insteadOf "https://bitbucket.org"
PIPELINE_USER = [YOUR_USERNAME]
PIPELINE_APP_PASSWORD= its your key that you'll generate.
to create a new "App Password" you must go in "Personal Settings > Apps Password".
Hi Aldofo,
Welcome to the community!
I have some questions regarding how you are setup. Though first, I would clarify that since you are using HTTPS to access the repositories, the SSH key would not be used for authentication. Instead, there will be a need to provide the web credentials or a personal token in order to authenticate to the server.
I do note that there is a message noting that "Terminal prompts are disabled", at a point where I would expect that there would be a prompt for the username/password combination. Additionally, I see another error that "http authentication is required". Both of these allude to the need for a credential helper to provide the necessary authentication information.
git credential
You should see a usage message, if there is a credential helper available to your Git installation.
Once a credential helper is available, it needs to be configured with the needed username and password combination, or an access token. This will then satisfy the authentication needs of later Git operations over HTTPS.
One final thought, if the build process is disposable or otherwise a single use environment, like a Docker image for instance. You may need to provide the credential helper data to the Docker image thru an additional COPY step, which would land the ~/.git-credentials file onto its local filesystem for later Git operations.
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.