Machine: github-api-token不起作用

创建于 2016-01-06  ·  10评论  ·  资料来源: docker/machine

据我所知,版本0.5.5应该支持--git-api-token,但它似乎对我不起作用。 也许我弄错了,这些更改没有使它进入最新版本,还是我做错了其他事情?

% docker-machine --github-api-token=<redacted> create -d virtualbox shinybox
Running pre-create checks...
(shinybox) You are using version 4.3.14r95030 of VirtualBox. If you encouter issues, you might want to upgrade to version 5 at https://www.virtualbox.org
(shinybox) No default Boot2Docker ISO found locally, downloading the latest release...
Error creating machine: Error with pre-create check: Error getting a version tag from the Github API response.
You may be getting rate limited by Github.

% docker-machine --version
docker-machine version 0.5.5, build
areb2d kinbug

最有用的评论

这是受@kurtharriger启发的解决方法

curl -Lo ~/.docker/machine/cache/boot2docker.iso https://github.com/boot2docker/boot2docker/releases/download/v1.9.1/boot2docker.iso
docker-machine create --driver virtualbox default
Creating CA: /home/sjackman/.docker/machine/certs/ca.pem
Creating client certificate: /home/sjackman/.docker/machine/certs/cert.pem
Running pre-create checks...
(default) Unable to get the latest Boot2Docker ISO release version:  Error getting a version tag from the Github API response.
(default) You may be getting rate limited by Github.
Creating machine...
(default) Unable to get the latest Boot2Docker ISO release version:  Error getting a version tag from the Github API response.
(default) You may be getting rate limited by Github.
(default) Copying /home/sjackman/.docker/machine/cache/boot2docker.iso to /home/sjackman/.docker/machine/machines/default/boot2docker.iso...
…

所有10条评论

@kurtharriger,您好,我无法重现此问题。 您可以仔细检查令牌吗? 还可以尝试使用官方二进制文件,而不是brew提供的二进制文件吗?

升级后,验证令牌仍然存在。

作为解决方法,我可以手动下载.iso文件并将其保存在特定位置。 我应该在哪里保存它,以便docker-machine在本地找到它,而不尝试再次下载?

% docker-machine --version
docker-machine version 0.5.5, build 02c4254

% docker-machine --github-api-token=$GITHUB_TOKEN create -d virtualbox shinybox
Running pre-create checks...
(shinybox) No default Boot2Docker ISO found locally, downloading the latest release...
Error creating machine: Error with pre-create check: Error getting a version tag from the Github API response.
You may be getting rate limited by Github.

% curl  https://api.github.com/user\?access_token\=$GITHUB_TOKEN
{
  "login": "kurtharriger",
...
}

它不使用令牌就可以工作吗?

Le mer。 一月6日。 2016à17:36,Kurt Harriger通知@ github.com a
écrit:

升级后,验证令牌仍然存在。

作为一种解决方法,我可以手动下载.iso文件并保存
特定的地方。 我应该在哪里保存它,以便docker-machine将
在本地找到它,而不尝试再次下载?

%docker-machine --version
docker-machine版本0.5.5,内部版本02c4254

%docker-machine --github-api-token = $ GITHUB_TOKEN创建-d virtualbox Shinybox
运行预创建检查...
(shinybox)在本地找不到默认的Boot2Docker ISO,正在下载最新版本...
错误创建机器:创建前检查错误:从Github API响应获取版本标签时出错。
您可能会受到Github的限制。

%curl https://api.github.com/user \ ?access_token \ = $ GITHUB_TOKEN
{
“ login”:“ kurtharriger”,
...
}

-
直接回复此电子邮件或在GitHub上查看
https://github.com/docker/machine/issues/2765#issuecomment -169381828。

不,我们的工作网络似乎总是受速率限制。 可能某些脚本在不使用auth令牌的地方运行,因此我们始终需要向github提供身份验证令牌。

似乎docker工具箱捆绑了所有内容,因此我下载并安装了该

使用与以下速率限制请求中相同的令牌时,我遇到相同的问题:

curl https://api.github.com/rate_limit\?access_token\=<redacted>
{
  "resources": {
    "core": {
      "limit": 5000,
      "remaining": 5000,
      "reset": 1452811101
    },
    "search": {
      "limit": 30,
      "remaining": 30,
      "reset": 1452807561
    }
  },
  "rate": {
    "limit": 5000,
    "remaining": 5000,
    "reset": 1452811101
  }
}

我的版本是0.5.6。

我现在也收到此错误。 昨天工作正常。 我不认为我会受到限制。 我提供了--github-api-token ,但没有帮助。

❯❯❯ docker-machine --github-api-token=redacted create --driver virtualbox default
Running pre-create checks...
(default) No default Boot2Docker ISO found locally, downloading the latest release...
Error creating machine: Error with pre-create check: Error getting a version tag from the Github API response.
You may be getting rate limited by Github.
❯❯❯ docker-machine --version
docker-machine version 0.5.6, build 61388e9

这是受@kurtharriger启发的解决方法

curl -Lo ~/.docker/machine/cache/boot2docker.iso https://github.com/boot2docker/boot2docker/releases/download/v1.9.1/boot2docker.iso
docker-machine create --driver virtualbox default
Creating CA: /home/sjackman/.docker/machine/certs/ca.pem
Creating client certificate: /home/sjackman/.docker/machine/certs/cert.pem
Running pre-create checks...
(default) Unable to get the latest Boot2Docker ISO release version:  Error getting a version tag from the Github API response.
(default) You may be getting rate limited by Github.
Creating machine...
(default) Unable to get the latest Boot2Docker ISO release version:  Error getting a version tag from the Github API response.
(default) You may be getting rate limited by Github.
(default) Copying /home/sjackman/.docker/machine/cache/boot2docker.iso to /home/sjackman/.docker/machine/machines/default/boot2docker.iso...
…

这是受@kurtharriger启发的解决方法

curl -Lo ~/.docker/machine/cache/boot2docker.iso https://github.com/boot2docker/boot2docker/releases/download/v1.9.1/boot2docker.iso
docker-machine create --driver virtualbox default
Creating CA: /home/sjackman/.docker/machine/certs/ca.pem
Creating client certificate: /home/sjackman/.docker/machine/certs/cert.pem
Running pre-create checks...
(default) Unable to get the latest Boot2Docker ISO release version:  Error getting a version tag from the Github API response.
(default) You may be getting rate limited by Github.
Creating machine...
(default) Unable to get the latest Boot2Docker ISO release version:  Error getting a version tag from the Github API response.
(default) You may be getting rate limited by Github.
(default) Copying /home/sjackman/.docker/machine/cache/boot2docker.iso to /home/sjackman/.docker/machine/machines/default/boot2docker.iso...
…

谢谢你们这对我有用,但是必须将curl命令中的boot2docker.iso的URL更新为https://github.com/boot2docker/boot2docker/releases/中可用的最新(稳定)版本

此页面是否有帮助?
0 / 5 - 0 等级