If you want to push from REPO-A to REPO-B, first import your SSH keys (or create another user who have write access to REPO-B) to the SSH keys section of REPO-A repository settings.
Then you can add lines like this in your bitbucket-piplelines.yml file:
- date > test.txt
- apt-get update
- apt install --assume-yes --no-install-recommends git openssh-client
- git config --global user.name bitbucket-pipelines
- git config --global user.email email@example.com
- git clone firstname.lastname@example.org:REPO_OWNER/REPO-B.git
- cp test.txt REPO-B
- cd REPO-B
- git add -A
- git commit -m "Added new version of test.txt at $(date)"
- git push
Hey Shanish, see https://bitbucket.org/blog/cloning-another-bitbucket-repository-in-bitbucket-pipelines, it should help.
Update: actually, nevermind. This method only enables read-only access to the target repository so you won't be able to push.
I tried a few different things and this was the closest that I got:
image: node:4.6.0 pipelines: default: - step: caches: - node script: # Modify the commands below to build your repository. - npm install -g browserify - browserify src/main.js -o bundle.js - git config user.email **email** - git checkout -b temp - git remote add dist https://**username**:$PASSWORD@bitbucket.org/ragnarokgame/ragnarokgame.bitbucket.io.git - git add bundle.js - git add index.html - git add style.css - git commit -m "build [skip ci]" - git push dist master --force
(I've removed my username and email to post it here)
Any help is greatly appreciated as I'm very new to this.
Beginning on April 4th, we will be implementing push limits. This means that your push cannot be completed if it is over 3.5 GB. If you do attempt to complete a push that is over 3.5 GB, it will fail...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events