Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

SSH/HTTPS authentication in bitbucket pipeline not working to push commits

seshu puli
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 7, 2023

I am using SSH/HTTPS authentication in bitbucket pipeline to push commits to target repo from source

---------

image: maven:latest
options:
debug: true

pipelines:
default:
- step:
name: Deploy Helm Chart to EKS
image: atlassian/default-image:2
services:
- docker
caches:
- docker
script:
- apt-get update && apt-get install -y awscli
- apt-get update && apt-get install -y curl
- curl -LO https://get.helm.sh/helm-v3.6.3-linux-amd64.tar.gz
- tar -zxvf helm-v3.6.3-linux-amd64.tar.gz
- mv linux-amd64/helm /usr/local/bin/helm
- helm version
- cd helm
- helm package .
- mkdir -p /tmp/charts
- mv *.tgz /tmp/charts
- cd /tmp/charts
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY" | ssh-add -
- git clone git@bitbucket.org:logit-one/eks_helm_repo.git target-repo

- cp /tmp/charts/client_process-1.0.tgz target-repo/
- cd target-repo
- git config --global user.email "seshu.puli@transporeon.com"
- git config --global user.name "seshu_puli"
- git add .
- git commit -m 'charts'
- git push origin master

1 answer

0 votes
Syahrul
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 8, 2023

G'day, @seshu puli and welcome to the community!

It appears that you aim to push back to your Bitbucket repository using HTTPS or SSH. I recommend reviewing the following documentation, as it provides the best explanation of how to accomplish this:

Push back to your repository 

Let me know if that helps.

Cheers,
Syahrul

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events