Travis-ci configuration releases with the -github switch

I'm having trouble installing releases with the github token. I like travis-ci, but I don't want to give out my github password - I need to use a token, and I read the documentation as it should be possible this way. Unfortunately, it still asks for a password:

$ travis login --github-token XXXXXXXXX Successfully logged in as ligi! $ travis whoami You are ligi (ligi) $ travis setup releases Detected repository as ligi/gobandroid, is this correct? |yes| Username: 
+9
source share
3 answers

CLI Travis CI will not send the GitHub password to Travis CI, instead it will send it to GitHub and use it to create a GitHub token (the same is true for travis login ).

However, if you are still embarrassed, you can configure the deployment manually.

Add the following to your .travis.yml:

 deploy: provider: releases api_key: "GITHUB OAUTH TOKEN" file: "FILE TO UPLOAD" skip_cleanup: true on: tags: true all_branches: true 

You can encrypt the GitHub OAuth token through travis encrypt ... For this, there is no need to register through the CLI, and encryption takes place locally.

See http://docs.travis-ci.com/user/deployment/releases/ for full documentation

+3
source

I think you can use -t / --token , for example:

 travis login --org --github-token G1tHu8T0K3N travis setup releases --org -t G1tHu8T0K3N 
0
source

Here is a route that does not include entering the GitHub password into the terminal. I suppose you have Travis CI installed. This assumes you are using travis-ci.org , but replacing --org with --com should work differently.

If github.com/your/repo was your repo:

  1. Create a personal Github access token with the following scope: read:org, public_repo, repo:status, repo_deployment, user:email, write:repo_hook
  2. (Optional?) Log in using travis login <your token> --org
  3. Run echo <your key> | travis encrypt --org -r your/repo echo <your key> | travis encrypt --org -r your/repo echo <your key> | travis encrypt --org -r your/repo echo <your key> | travis encrypt --org -r your/repo
  4. Use this secret in your .travis.yml file as described in the documentation

You may need to provide a complete repo scope, but public_repo enough for the free Travis level. I am also not sure which of the other areas are mandatory.

echo is useful on Windows because Ctrl-D does not work properly in Powershell.

0
source

Source: https://habr.com/ru/post/973804/


All Articles