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

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

How to disable SSH git push info banner on Bitbucket Server

When pushing to Bitbucket Server over SSH the server gives an info banner that discloses the server base URL when proposing to create a pull request from current branch to default branch.

I want to use a reverse ssh tcp proxy with different IP address to give temporary access to Bitbucket Server to external employees who should not know the base URL of the server.  But if they push from terminal they would see the banner that divulges the base URL in a message like that:

remote: 
remote: Create pull request for test:
remote:   https://baseURL:port/bitbucket/projects/someProject/repos/some_repo/pull-requests?create&sourceBranch=refs/heads/test
remote: 


I searched through Bitbucket Server config properties documentation that show all possible options in bitbucket.properties file. But did not find the right option. There are tons of options but not like that.

Do I miss something or it is not possible? Or may be it's in some other place?

1 answer

0 votes
Daniel Eads Atlassian Team Dec 27, 2019

Welcome to the Community, and interesting question!

The messages you see there are part of post-receive hooks that come standard in Bitbucket Server. Unfortunately the particular line you see which shows the URL is not configurable - it's hardcoded to use the base URL.

Your scenario of using a reverse SSH session to obscure information is interesting. I would be concerned about additional tactics a determined user could try in order to find the Bitbucket Server anyway even if the particular post-commit message were hidden. For example, could they access the .gitconfig file in the repository and then do a lookup on the server's IP address in the host's ARP table? While the post-commit messages might be an easy win to obscure the URL, I have a feeling that someone who really wanted to find it might be able to do it anyway.

I might suggest using a separate Bitbucket Server instance with a throwaway base URL if you are terribly concerned about hiding the primary server. If you had an instance set up solely for the purpose of these external employees, you could use something like a repository mirror plugin to sync the repos from the "other" Server instance to your primary one.

Cheers,
Daniel

Suggest an answer

Log in or Sign up to answer
TAGS
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,849 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