SSH access

You are able to activate build debugging at the bottom of the build detail view for projects running on Codeship Basic. The SSH debugging session only works for branches still available in your repository.

If you are using Codeship Pro, you can debug locally by using the command-line tool. You can refer to the Installation Documentation to get your builds running locally for debugging.

  • include a table of contents

Machine State

When you start a SSH Debug session we will clone the repository and set up all environment variables that you defined and that we set by default. We won’t run any setup or test commands. This gives you a clean machine so you can fully test and debug your application on Codeship. No generated files or changes done in any previous builds will be available. The SSH session is completely separate from any builds before.

Codeship Command

Inside the SSH session, you have access to the Codeship command. It provides some convenient methods to debug your project.

cs help

Existing Directories

There are a few directories in your home directory (~). The most important one is the clone directory. The clone directory is your project root and contains your source code.

Useful commands

Get insight into Environment variables.

printenv

You can use grep to filter the Environment

printenv | grep CI

NodeJS version

By default we set the NodeJS version to 0.10.25

You can manage the NodeJS version via NVM.

To install a new version of NodeJS use

nvm install 0.11

or use a different version of NodeJS

nvm use 0.10.25

Timeout

The debug build will shutdown itself after 60 minutes

You can shutdown the debug build manually by using

cs exit

Clear Dependency Cache

If you want to start really fresh, you can clear the Dependency Cache by using

cs clear-cache

What is an SSH public key?

SSH is a protocol which uses asymmetric key algorithms for authentication. If you want to dig deeper into Public-Key cryptography you can start by reading the Wikipedia article.

Get my public SSH Key

You can retrieve your public SSH Key by using the following command in your Terminal.

cat ~/.ssh/id_rsa.pub

Generate my SSH Key

To generate your own SSH Key, open up your Terminal and use this command.

ssh-keygen -b 8192

Need More Help?

Get in touch if you need more help, or post on Stack Overflow using the tag #Codeship.