Trying to get Travis CI to work with SSH Key w/o signing into Github

build-env

#1

I already followed the steps exactly specified at this link

However, I am still having the issue. My build will get stuck when accessing the private repo.

$ julia --check-bounds=yes -e 'Pkg.clone("https://github.com/xxxx/xxxx.git")'
INFO: Cloning xxxx from https://github.com/xxxx/xxxx.git
Username for 'https://github.com':
Done: Job Cancelled

Note: I manually cancel it after a few minutes of waiting. How can I get it to use the SSH key I have setup and bypass this username and password field?

Note: xxxx is used in place of the name of my project to make this post general. I have already checked out the links on Travis CI and they don’t make it clear what needs to occur. Thank you!


#2

Could you try changing the git url to use git+ssh? eg. git@github.com:xxx/xxx.git


#3

Yes. Just to be clear, if I want to use the Deploy or User key, all I need to do it is change it to ‘Pkg.clone("git@github.com:organizer_name/dependancy_I_want_installed.git")’?


#4

That is what I am thinking needs to happen to make it work, but not 100% sure until you try it :slight_smile:


#5

Hey Josh, sorry for the delay. I was resolving other issues. I did what you suggested: ‘Pkg.clone("git@github.com:organizerName/REPO_name.git")’ and I got the following error:
ERROR: failed to clone from git@github.com:organizerName/REPO_name.git, error: GitError(Code:EEOF, Class:SSH, ERROR: Repository not found.)

What should I try next?


#6

Also, note that the API Token documentation for private repo dependencies does not work. https://docs.travis-ci.com/user/private-dependencies/#api-token


#7

https://docs.travis-ci.com/user/languages/go/#installing-private-dependencies these steps do not resolve the issue either