Using SSH keys is only available for private repositories on traviscc.com (paid plans).
Using the travis command-line travis you can create a new SSH key that will be configured on both Travis CI and your GitHub account (if you use the special GitHub user for Travis CI).
Here are the necessary console commands:
# Install Travis command line tool gem install travis
Instead of generating a new SSH key with travis , you can also load an existing SSH key using
travis sshkey --upload "C:\my_keys\id_rsa" -r organization/repository
After the SSH key has been created, it is recommended that this key be noted in the config file in the .ssh your Travis user. You can do this by adding these lines to your .travis.yml :
# http://docs.travis-ci.com/user/build-lifecycle/ before_script: - echo -e "Host github.com\n\tHostName github.com\n\tUser git\n\tIdentityFile ~/.ssh/id_rsa\n" >> ~/.ssh/config
For more information, this is a link to the official documentation: Creating a new key .
Benny neugebauer
source share