Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Setting base url for Bitbucket access via SSH

Vishnu V Potti June 25, 2018

Hi,

 

I am referencing below link and trying to set base path for HTTP and SSH in Bitbucket.

https://confluence.atlassian.com/bitbucketserver/moving-bitbucket-server-to-a-different-context-path-776640153.html

Background : We are upgrading bitbucket and getting bitbucket up via docker containers. We will be running on 2-3 containers and then using Netscaler to loadbalance.

So we are planning to have a url like https://entloginpage.domain.com/bitbucket for HTTP. There are other applications running on  https://entloginpage.domain.com with different contexts.

So I set Base url in bitbucket as https://entloginpage.domain.com/bitbucket.

Now for SSH, I read that we cannot have context and documentation says "SSH operations occur without the context path at ssh://my-bitbucket-hostname:7999."

Since bitbucket will be running on multiple containers, how this will work. I dont want the users to get containerhost specific ssh urls and instead want them to go through entloginpage.domain.com if possible.

 

Please let me know .

 

Thanks,

Vishnu

 

 

2 answers

1 accepted

1 vote
Answer accepted
Edward
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 4, 2018

Hi @Vishnu V Potti,

Using Clustering from Bitbucket Data Center you can join multiple nodes to the cluster. With the Bitbucket Data Center requirements, the load balancer will handle which node(server) gets the SSH request.

Because the load balancer acts similar to a proxy, the steps outlined at Enabling SSH access to Git repositories when running Bitbucket Server behind a proxy and Setting up SSH port forwarding should be followed. This will let you setup the load balancer to handle ssh requests through entloginpage.domain.com. If you have multiple SSH services other than Bitbucket under this domain, you can change which port the load balancer handles the SSH requests from (See With "Port Forwarding on custom port" below).

After you have set the load balancer up, you can use the example table shown at Enabling SSH access to Git repositories when running Bitbucket Server behind a proxy to configure the SSH base URL:

Without Port Forwarding:

  • SSH base URL: ssh://my-bitbucket-hostname:7999
  • SSH Port: 7999
  • Bitbucket Base URL: https://my-bitbucket-hostname
  • Resulting SSH Repository URL: ssh://git@my-bitbucket-hostname:7999/<projectname>/<reponame>.git

With Port Forwarding on default ports:

  • SSH base URL: ssh://entloginpage.domain.com
  • SSH Port: 7999
  • Bitbucket Base URL: https://my-bitbucket-hostname
  • Resulting SSH Repository URL: ssh://git@entloginpage.domain.com/<projectname>/<reponame>.git

With Port Forwarding on custom port 44:

  • SSH base URL: ssh://entloginpage.domain.com:44
  • SSH Port: 7999
  • Bitbucket Base URL: https://my-bitbucket-hostname
  • Resulting SSH Repository URL: ssh://git@entloginpage.domain.com:44/<projectname>/<reponame>.git


Thanks,
Edward

0 votes
Craig Castle-Mead
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 25, 2018

Hey Vishnu,

Just taking a guess here, but on your load balancer i would expect you can set your 7999 listener to forward to 7999 on your containers. 

 

CCM

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events