Skip to content
This repository has been archived by the owner on Sep 26, 2021. It is now read-only.

github-api-token does not work #2765

Closed
kurtharriger opened this issue Jan 6, 2016 · 10 comments
Closed

github-api-token does not work #2765

kurtharriger opened this issue Jan 6, 2016 · 10 comments

Comments

@kurtharriger
Copy link

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
@dgageot
Copy link
Member

dgageot commented Jan 6, 2016

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?

@kurtharriger
Copy link
Author

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

@dgageot
Copy link
Member

dgageot commented Jan 6, 2016

It works without using the token right ?

Le mer. 6 janv. 2016 à 17:36, Kurt Harriger notifications@github.com 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
#2765 (comment).

@kurtharriger
Copy link
Author

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.

@dgageot dgageot modified the milestones: 0.6.0, 0.5.6 Jan 6, 2016
@babelfish
Copy link

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.

@dgageot
Copy link
Member

dgageot commented Jan 18, 2016

Related to #2296?

@dgageot dgageot modified the milestones: 0.6.0, 0.7.0 Jan 19, 2016
@dgageot
Copy link
Member

dgageot commented Jan 26, 2016

Duplicate of #2296

@dgageot dgageot closed this as completed Jan 26, 2016
@sjackman
Copy link

sjackman commented Feb 3, 2016

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

@sjackman
Copy link

sjackman commented Feb 3, 2016

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...
…

@marcosbaesse
Copy link

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/

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants