How to push to a private bitbucket repo without a user email? - bitbucket

I have a private bitbucket repo pipeline and I want to use it to update some files on another bitbucket cloud gitops private repo, and I'm wondering whether there is a way to set credentials on the gitops repo without creating or using a user email, like setting a password or ssh keys in the gitops repo and use that in the pipeline to be able to push.
Any help would be appreciated.

Related

How to clone a bitbucket source code repository using credentials in Jenkins

I am using Jenkins with my Linux box. I have two bitbucket repositories. I am trying to create a Jenkins pipeline.
Repo_A - Jekinsfile resides here.
Repo_B - Project's source code resides here.
I want Jenkins to take configurations (Jenkinsfile) from Repo_A. Also, I want Jenkins to clone my source code to /some/random/directory. The credentials are stored in Jenkins, and can be used for both repos.
How can I use multiple repos in a single pipeline? Can somebody please tell me how to do this?
You need to use ssh authentication, it is suported by Genkins
Here is similar question: how to setup ssh keys for jenkins to publish via ssh
To add new repository

AWS Code PipeLine not getting all repository of BitBucket account

I am using AWS CodeBuild and CodePipeline service to implement CI/CD in my project.
AWS CodeBuild using Bitbucket I am getting all repository of my Bitbucket account.
While Creating CodePipeLine and connect with my BitBucket, I can't get all repository of my BitBucket account.
I have admin access to BitBucket.
AWS CodeStar injected successfully in Bitbucket
So is there any extra setting need in the BitBucket account for implement AWS Codepipeline?
CodePipeline uses a Bitbucket App installed on your Bitbucket account to access repositories. Currently Bitbucket only allows Apps to access repositories on the same account that the App was installed on.1 I’ve passed this feedback onto the CodePipeline team who is partnering with Atlassian on this integration.
For now you can try this workaround:
Select the connection
Type the name of the Repo as <account>/<repository-name> in the "Repository name" field
Select the branch
CodePipeline connection should be able to retrieve the repo when you run the pipeline.
References
1: Bitbucket connections only provide access to repositories owned by the Bitbucket account that was used to create the connection.
Currently, Bitbucket only allows Apps to access repositories on the same account.
You can create a webhook from Bitbucket to GitHub and connect the correct Github repo to CodePipeline.
https://poeditor.com/blog/webhooks-solution-automate-sync-poeditor-github-bitbucket-repos/#:~:text=To%20add%20a%20webhook%20to,URL%20in%20the%20empty%20field.
We were able to get acces to the repositories in another workspace by giving, to our bitbucket service account, workspace administration rights.
We added it to a group that has the right to
Permission needed for account
For sure, you need a bitbucket administrator doing that for you.
Having done that, we can create a codestart connexion that access the repository in another workspace.

Apache Nifi-registry BitBucket repository?

I am looking for version control repository in BitBucket like GitHub. I have found Nifi Git repository. But at my organization we have private account in BitBucket. My question is can I create version control repository with Apache Nifi-registry in bitbucket? There is a class (org.apache.nifi.registry.provider.flow.git.GitFlowPersistenceProvider) which is associated with Git in the providers.xml file in nifi-registry. For bitbucket which class should i use? any help, guidelines will be greatly appreciated. Thanks!
It shouldn't matter where the remote git repo is located, so it should work with BitBucket just like it does with GitHub. You would clone the repo from BitBucket to the server where NiFi Registry is running, and then configure providers.xml to use the local cloned repo, and enter credentials to enable pushing to remote.
It should work the same as how you would interact with the git repo from the command line. You add or modify files in the local repo, commit them, then push to remote. In this case, all these steps will be done by registry for you.

Dockerhub automated build: BitBucket repository with private submodules

I have a private BitBucket repository that stores my Dockerfile. This repository has two other private BitBucket repositories as git submodules. I setup an automated build process on Docker hub and added the public SSH key to my three private repositories on BitBucket. However, when the build runs, it successfully connects to the main private repository on BitBucket but fails when trying to get the submodules. I see the following error in the log file:
fatal: could not read Username for 'https://bitbucket.org': No such device or address
It seems like the build agent is trying to access the submodules via HTTPS, and obviously, fails as there is no web access setup.
Am I missing something or is it a limitation that I'll have to live with for the moment?
I figured it out. My .gitmodules had an HTTPS URL for that particular repository. I edited the .gitmodules file and changed the URL to SSH. Seems like it is building now :-)

Continuous Deployment Bluemix with existing Bitbucket repo

I'm experiencing an issue with Bluemix DevOps continuous integration system when it comes to linking the project to an existing private Bitbucket repository.
I tried the steps presented in this link and although I'm able to see the content of the Bitbucket folder, the devOps is still stuck to the initial commit and it does not take the appropriate files during the building stage.
Can anyone provide any tips or suggestions?
Many thanks
Those instructions, although it mentions "private", are only valid for a Public repository, as you have noted without a similar style to the GitHub integration we don't have a way to setup a shared token you would need to be able to authenticate. That said today, you cannot really use a pull method to pull changes from BitBucket to DevOps Services, you will need to use a push method from somewhere that you can authenticate to your private repo and the DevOps Services git repo to keep them in sync.
https://developer.ibm.com/answers/questions/197619/continuous-delivery-with-bitbucket-and-jazzhub.html

Resources