Home > Net >  Bitbucket pipeline to push code to another repo
Bitbucket pipeline to push code to another repo

Time:04-22

I have 2 repositories in the bitback, Repositories A and B. I need that when someone makes a commit in repository A, the pipeline starts, and copies my code to repository B. Now such a pipeline is used. But I get an error.

error: src refspec devops-test does not match any.
error: failed to push some refs to

pipeline

 - date > test.txt  
 - git remote add two https://login:[email protected]
 - git add .
 - git commit -m "push [scip ci]"
 - git push two devops-test --force

CodePudding user response:

clone:
  depth: full 
pipelines:
  branches:
    uat:
      - step:
          script: 

            - echo "sonar reports"
            - apt install -y git
            - git remote add new https://priya400:[email protected]/bbc-test4/firstrepo.git
            - touch test111.txt
            - git add .
            - git commit -m "push to remote"
            - git push new aws/client:devops-test --force```
  • Related