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

How to disable SSH git push info banner on Bitbucket Server

denisnone December 25, 2019

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
Atlassian Team members are employees working across the company in a wide variety of roles.
December 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
AUG Leaders

Atlassian Community Events