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

Next challenges

Recent achievements


  • Give kudos
  • My kudos


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Bitbucket Pipe push back to repo Edited

I've been able to `git push ...` in Pipeline scripts for awhile now, however, I'm moving over to using the new "Pipe" variant of deployments and I'm finding it impossible to push updates back to the same repo.

Is this only supported in Pipelines and not Pipes


I receive the following error:

`fatal: unable to access '': Failed to connect to localhost port 29418: Connection refused`

3 answers

1 accepted

0 votes
Answer accepted

@Michael Russell @Brett Mathe you can use the git auth proxy feature from withing the pipe. All you have to do is to add the following line somewhere in your script:

git config http.${BITBUCKET_GIT_HTTP_ORIGIN}.proxy http://host.docker.internal:29418/

This will route git traffic from the docker container to the same git auth proxy that is used to authenticate git push commands in pipelines. Make sure you use the BITBUCKET_GIT_HTTP_ORIGIN as your git origin as well. 

More info about pushing back to a repo from pipelines:

Will that port always be the same? And if so, can we get this in the confluence doc you linked to as methods to push from a "Pipe" specifically; I read through that which lead me to the whole auth string bit but took a moment to get there.

This was a bit of a time sink for myself with no straight documentation on the internal workings of Pipes and git push back. It makes sense when you dig in, it was just bump in time when I was porting things over to Pipes.


Thanks for the feed back @Alexander Zhukov 

The host and port should be the same. We'll consider adding this to a confluence doc after we discuss this internally. 

OK, thanks @Alexander Zhukov it seems between your method, which appears to be what happens during build setup or using the BB auth string is the way to go.

Hopefully you all can get something on the docs for this :)


Unfortunatelly doesn't work, error messgae:

Could not resolve proxy: host.docker.internal


git config http.${BITBUCKET_GIT_HTTP_ORIGIN}.proxy http://host.docker.internal:29418/
git tag test
git push origin

@Mateusz Przybyłek this approach is for pushing from a pipe. If you wan't to push from a pipeline, you should set the proxy to 'localhost' instead:


git config http.${BITBUCKET_GIT_HTTP_ORIGIN}.proxy http://localhost:29418/

See this page for more details about pushing back from pipelines 

My current work around is to do `git remote set-url origin "https://${BB_AUTH_STRING}${BITBUCKET_REPO_FULL_NAME}.git"` would be amazing for Pipes to work the same way as Pipelines.

I'm running into this issue too.  Did you have to setup OAuth to get this to work?

I just do the above in my comment, you can make a BB_AUTH_STRING via instructions here


It's basically just a username/app-password mash up.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bitbucket

Powering DevOps with Bitbucket Server & Data Center

Hi everyone, The Cloud team recently announced 12 new DevOps features that help developers ship better code, faster   ! While we’re all excited about the new improvements to Bitbucket ...

1,914 views 0 7
Read article

Community Events

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

Events near you