travis-ci安装程序发布--github-token [英] travis-ci setup releases with --github-token

查看:169
本文介绍了travis-ci安装程序发布--github-token的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用带有github令牌的安装版本时遇到问题.我喜欢travis-ci,但是我不愿意分发我的github密码-我需要使用令牌,并且我阅读了文档,因为这样可以做到.不幸的是,它仍然要求密码:

I am having problems using setup releases with a github token. I like travis-ci but I am not willing to hand out my github password - I need to use the token and I read the documentation as this should be possible this way. Unfortunately it still asks for pasword:

$ 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: 

推荐答案

Travis CI CLI不会将GitHub密码发送给Travis CI,而是将其发送给GitHub并使用它生成GitHub令牌(相同的是对于travis login为true.

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

但是,如果您仍然感到不舒服,则可以手动配置部署.

However, if you still feel uncomfortable, you can configure the deployment manually.

将以下内容添加到您的.travis.yml中:

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

您可以通过travis encrypt ...加密GitHub OAuth令牌.无需为此通过CLI登录,并且加密在本地进行.

You can encrypt the GitHub OAuth token via travis encrypt .... It is not necessary to be logged in via the CLI for this, and the encryption happens locally.

请参见 http://docs.travis-ci.com/user/deployment/版本/以获取完整文档

这篇关于travis-ci安装程序发布--github-token的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆