Machine: github-api-token does not work

Created on 6 Jan 2016  ·  10Comments  ·  Source: docker/machine

From what I can tell version 0.5.5 should have support for --git-api-token but it does not appear to be working for me. Perhaps I'm mistaken and these changes did not make it into the last release or am I doing something else wrong?

% 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

Most helpful comment

Here's a workaround inspired by @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...
…

All 10 comments

Hi @kurtharriger I can't reproduce the issue. Can you double check your token? Also could you try the official binaries, not those provided by brew?

Upgraded, verified token and still same issue.

As a workaround can I manually download the .iso file and save it somewhere specific. Where should I save it so that it docker-machine will find it locally and not attempt to download it again?

% 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",
...
}

It works without using the token right ?

Le mer. 6 janv. 2016 à 17:36, Kurt Harriger [email protected] a
écrit :

Upgraded, verified token and still same issue.

As a workaround can I manually download the .iso file and save it
somewhere specific. Where should I save it so that it docker-machine will
find it locally and not attempt to download it again?

% 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",
...
}


Reply to this email directly or view it on GitHub
https://github.com/docker/machine/issues/2765#issuecomment-169381828.

No, our network at work always seems to be rate limited. Probably some script running somewhere that isn't using an auth token so we always need to provide an authentication token to github.

It appears docker toolbox has everything bundled in it so I downloaded and installed that and it copied the boot2docker.iso into the needed places to get it going.

I'm having the same issue when using the same token as in the following rate limit request:

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
  }
}

I'm on version 0.5.6.

I'm getting this error as well now. It worked fine yesterday. I don't think I'm being rate limited. I provided a --github-api-token, but it didn't help.

❯❯❯ 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

Here's a workaround inspired by @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...
…

Here's a workaround inspired by @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...
…

Thank you guy. This worked to me, but was necessary to update the url of the boot2docker.iso in the curl command to the latest (and stable) version available in https://github.com/boot2docker/boot2docker/releases/

Was this page helpful?
0 / 5 - 0 ratings