last day (15 days later) » 

17:13
2
A: How to get Travis CI to work with a SSH Key: currently gets stuck when accessing my private rep(wants the username)

SquickYou need to add the SSH key to the Travis UI under an environmental variable for your desired repo. You also need to add the key to the .travis.yml file on that repo. https://docs.travis-ci.com is the docs for Travis

I have already added it to my Travis UI. Can you provide specifics(example) as to how to add the key to the top of my .travis.yml file? I have already looked at the docs and it is not clear as to how to do this.
Actually, I have it set up right no under SSH key, can you elaborate on how I can set it up under Environment Variable?
You go to your repo that you linked with travis, click the settings tab, and its under environmental variables
Place your SSH key into the value and give it a name and click add
I see that! But what variable do I create? Do I call it SSH? or GitHub Password, etc.?
ok, let me try that!
It is still getting stuck when I run the build. I have it saved in my SSH key setting, and copied it, and made an E.V. called SSH and it still stops at "username for github.com :"
Do you have a GitHub_token set up?
I think so
I believe that I did so
17:14
whats the value
I followed the link here
I have a SSH key set up, I'm not sure what a GitHub token is
could you post your travis.yaml
Also the giuthub token will not help me since I still need the username.
have you tried putting in your username when it asks?
I cannot do that since its an auto build. There is no ability for me to type it in
17:21
okay so im gonna run you through what I did to set up travis for my repo
run travis encrypt and paste your ssh key into your terminal(or whatever cli you use)
ok, if possible can you type out the actual command so I don't need to make inferences as to what to type.
travis encrypt SSHkey
but replace sshkey with your actual key
Ok, it gave me the encrypted key, should I just paste it into my .travis file now?
yes, and delete the other key you put on the travis UI
Also, it may be worth noting that I have Travis cl set up to autobuild after a commit to my private repo.
delete the other key from the SSH Key section in Travis CI settings?
17:31
yeah I have that too
no in the environment section
env:
global:
- secure:
this is the format you have to put into your travis.yml file
put the key next to the secure spot
what section of the file? Script:, ebfore script, near the top.
or near the top*, or does it not matter?
does not matter
ok I am trying it
its building right now
It still gets stuck
could it be become I do - julia --check-bounds=yes -e 'Pkg.clone("https://github.com/xxxxx/xxxxx.git")'
that package I am referencing is a private repo. Is the point of SSH keys that it will download all required dependencies by default, such that me doing this manual clone is unnecessary and throwing off the system? this package, xxxxx, is a dependency of the main package/file I am trying to build.
17:51
so you're trying to copy a repo
using travis ?
yes, I am trying to do a clone of a private repo since it's a dependency for the private repo I am building
okay so you are deploying the copy of the repo to your repo correct?
yes
in my real code I do using xxxxx to access the package
but here I need to bring it into the Travis environment so I have to clone it, and that is where it gets stuck.
do you have a GitHub token in your deploy section of your travis.yml?
no
I don't have a deploy section of my Travis file
but I need a username and a token!
it stops at Username for 'https://github.com':
17:57
if you're deploying to your repo you need to specify your repo's info In the deploy section
because its asking for you're username
so it can deploy it to your repo
how do I do that? Can you provide an example?
yes
deploy:
- provider: pages
edge:
branch:
skip_cleanup: true
github_token:
github_url:
verbose: true
on:
branch: master
so what my repo did was take any changes to my files on my repo, and deploy them to a GitHub pages. so it updated the content automatically when the repo was changed
i took the values out
so it won't ask for my username if I do it this way? and what are the on, edge, and provider tabs for?
nvm I see it on the docs
but what if I don't want to "Travis CI can deploy your static files to GitHub Pages after a successful build."
All I want is for it to build, not to deploy somewhere after a successful build
18:06
try to run travis login --org
on your cli
this may log you in so you dont get that error
I am running the files on travis CI servers not locally on my device
so I dont think that will help me
hm
honestly I never got this error when I did mine
I think its an authentication issue
I know its something simple
which is why its frusterating
it going to be add "this line or code" and it will work fine
thank you for trying to help!
you're welcome
sorry I couldn't fix it for you

last day (15 days later) »