This article is about General Codeship Configuration.

Self-hosted SCM

You will need roughly 3 minutes to read this article.

Enterprise Support

Codeship supports self-hosted Git repositories for the GitHub Enterprise, GitLab Community Edition, GitLab Enterprise Edition and Bitbucket Server products - in addition to our standard cloud SCM support.

Exposing Ports

To use your private Git server with Codeship, you will need a publicly reachable endpoint with ports 22 and 443 open to the internet.

We require port 22 to clone your repository to run your builds and port 443 for status and clone requests.

Note that Bitbucket Server uses port 7999 rather than port 22.

To check that these ports are open you can run the following against your server from your local machine:

nc -v -w1 yourserver.com 22
Connection to yourserver.com 22 port [tcp/ssh] succeeded!

nc -v -w1 yourserver.com 443
Connection to yourserver.com 443 port [tcp/https] succeeded!

Personal Access Tokens

To connect to your self-hosted Git instance, you will need to retrieve your personal access token and add it to your Connected Services page.

To fetch your token, follow these instructions:

Bitbucket Note Codeship requires Bitbucket Server 5.5 due to prior versions not providing personal access tokens.

Github Note Although we now use Github Apps for connecting CodeShip to your cloud Github organization, Github Apps are not yet available for Github Enterprise. Once they become available we will update our integration.

Gitlab Note We require Gitlab version 9.6.3 or later due to user access design changes.

Token Access Scopes

In order for Codeship to be allowed to setup the necessary hooks etc. the personal access tokens need to have the correct set of scopes. Below you’ll find the necessary setting for each of the three self-hosted Git servers:

GitHub Enterprise

GitHub Enterprise Access Scopes

GitLab Community Edition

GitLab Community Edition Access Scopes

Bitbucket Server

Bitbucket Server Access Scopes

Usernames

When you’re using a self-hosted git server, you will need to supply your username as well so that we can map up your builds with your Codeship account and show them on your personal dashboard. All users of self-hosted git servers will need to do this, for the personal dashboard to work, but are not required to supply access codes. If you don’t expect to be pushing code, and are mainly setting up Codeship for others, you can leave the username(s) blank.

Note: Users of cloud SCMs, who authenticate with oAuth, do not need to supply usernames as we get the username as part of the authentication workflow.

IP Whitelisting

We have an IP Whitelisting option, which allows you to provide access to your git server, from just eight specific IP addresses. See IP Whitelisting documentation for more details.

SCM Feature Requests

We are continually evaluating our SCM integration support. If there is something you would like to see, please get in touch and let us know more details about your SCM needs.

Security

To read more about our security setup, please review our security documentation or ask us a question.

Need more help?

Contact our support team or post on Stack Overflow using the tag #codeship. Did you check the status page and changelog?

There are also several code examples and sample projects available for you to get started with.

Article not helpful?

Does this article need improvement? If so, please send feedback or submit a pull request!