Can't find SSH keys settings under Travis project settings

My CI project is dependent on another private repo. So I refer to the document to upload the private key using

➜ travis sshkey --upload ~/.ssh/id_travis_rsa --pro
Updating ssh key for SolarUltima/uni-sso with key from /Users/SolarUltima/.ssh/id_travis_rsa

Current SSH key: key for clone k8s-config
Finger print:    65:25:66:26:4d:5d:9f:ac:25:ba:ea:be:c4:d5:e3:5f

Still doesn’t work.

Seems the SSH keys config is only available for private repos.

The issue here is the main repo is public , but when you are deploying it, you’re doing it into a private repo and it needs to be downloaded. This scenario is not covered by the official documention.

The workaround is to switch copying the private repo via https instead of ssh , so no need to upload the SSH keys.

By setting up the GH_TOKEN in the settings, and then add that token to the .netrc file. Then copy the private repo via using https should work via:

.travis.yml:

  - echo -e "machine github.com\n  login $GH_TOKEN" > ~/.netrc
  - git clone https://github.com/SolarUltima/k8s-config.git ${HOME}/k8s-config

I’ve seen similar posts about this, if you have any more questions please let me know and I’ll be glad to help!

1 Like

Thank you sir @Montana,

This allowed me to push to the repo in question :slight_smile:

@SolarUltima,

Great to hear! If you have any other issues be sure to post back and I’ll help you.

Imprint