You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
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 commits-noreply@bitbucket.org
- git clone git@bitbucket.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
Thanks for your reply - this was a while ago so I no longer need this, but hopefully it’ll be useful for someone else :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey i am not able to achieve, to push in another bitbucket repo from another repo pipeline. Can you please explain how i can put SSH keys?
what you have written above to import keys, that i am not able to get properly.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Could you share your bitbucket-pipelines.yml, it looks like you are not staging bundle.js with other files, perhaps it is specified in .gitignore?
Thanks,
Peter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
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.
Hi!
It wasn't in my .gitignore file, but I've now changed my workflow so that I no longer need to do this.
Thank you for your help anyway!
Alex
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey did you ever get this working? Trying to do something similar.
I have repo A, I make a commit. I create a patch file of the last commit and I want to apply that patch to another repo in BitBucket, repo B.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I never did I’m afraid - this was for a project I was working on a while ago
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.