github - 在Docker构建过程中发出Grunt必需的github token

标签 github gruntjs docker github-api volojs

当在镜像的docker构建期间执行Grunt时,需要使用github身份验证 token 。如何为grunt提供所需的 token ?交互式传递不起作用(正如我已经指出的那样)。

Grunt 的信息是:

Running "volo:add:-nostamp:twbs/bootstrap/3.3.2:packages/bootstrap/" (volo) task
GitHub auth required for api.github.com/repos/twbs/bootstrap/tags: {"message":"API rate limit exceeded for XXX.XXX.XXX.XXX. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)","documentation_url":"https://developer.github.com/v3/#rate-limiting"}
GitHub access token required to complete action. In a web browser, go to:

https://github.com/settings/tokens

and generate a new "Personal access token" for volo. Only "repo" and "public_repo" permissions are needed. Paste the generated token below.
GitHub Personal Access Token: 

最佳答案

您可以将存储库的URL更改为:

https://<token>:x-oauth-basic@github.com/MyApp/myapp.git

有关更多信息,请访问:https://devops.profitbricks.com/tutorials/configure-a-docker-container-to-automatically-pull-from-github-using-oauth/

关于github - 在Docker构建过程中发出Grunt必需的github token ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30535385/

相关文章:

github - Jenkins Multibranch 管道不会触发来自 Github 的 PR 构建

html - 如何将图像添加到github网站上的导航栏

GitHub 页面优先级

css - 是否有根据 css 生成图像 Sprite 的繁重任务?

javascript - Grunt uglify 0.5 不写源图吗?

docker - 无法通过 URL 访问 Web 应用程序。从 Netscaler 到应用服务器的 SSL 连接失败

Docker compose,构建未知

github - 检查 GitHub Actions 上的发布标签是否是最新的

javascript - Grunt - 无法缩小js文件

bash - Docker 和 .bash_history