I am trying to commit my new application to the repository for the first time. Thought I followed the directions to a tee however I am getting the error in the subject line no matter what I try.
What is the trick to getting the first commit though? Did I not set up my key properly? It seems to tell me that keys are for read only access only but how does one commit with only read access?
Deployment keys are to deploy. You need to install an ssh key, or push via HTTP.
Go through the instructions at https://confluence.atlassian.com/bitbucket/set-up-ssh-for-git-728138079.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hmm weird, trying again https://confluence.atlassian.com/bitbucket/set-up-ssh-for-git-728138079.html If it doesn't work, try copy pasting it in
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here is what I was struggling with and the answer I discovered.
I was trying to run pipeline in one repo 'A', and then in the last step have it git clone repo 'B' which has another pipeline, make a change to a file in repo 'B', commit that change and push up to repo 'B', and then trigger the pipeline in repo 'B' to run a custom step.
I had the code in place to trigger the run of pipeline in 'B' using a call to curl. That call looks like this:
curl -X POST -is -u <username-goes-here>:<app-password-goes-here> \
-H 'Content-Type: application/json' \
https://api.bitbucket.org/2.0/repositories/<repo-project-name-goes-here>/<repo-b-name-goes-here>/pipelines/ \
-d '
{
"target": {
"ref_type": "branch",
"type": "pipeline_ref_target",
"ref_name": "master",
"selector": {
"type":"custom",
"pattern":"<custom-step-name-goes-here>"
}
}
}'
The app-password is a key point here. You need to get this from a settings page under your profile.
https://bitbucket.org/account/user/<username-goes-here>/app-passwords
The point that I struggled with is getting the git commit and git push to work.
The answer: I found that I had to add a ssh key under my profile:
https://bitbucket.org/account/user/<username-goes-here>/ssh-keys/
Then importantly... when I did the git clone I had to use https instead of ssh. So the clone looks like this:
git clone https://<username-goes-here>:<app-password-here>@bitbucket.org/<repo-project-name-goes-here>/<repo-b-name-goes-here>.git
Add that did the trick. Wee... Hopes this helps other.
Ps. The reason I do this git clone, commit and push is to pass arg values to the triggered pipeline. Which BTW seems to be the only way I could find to be able to run a pipeline with args.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.