Machine: github-api-token não funciona

Criado em 6 jan. 2016  ·  10Comentários  ·  Fonte: docker/machine

Pelo que posso dizer, a versão 0.5.5 deve ter suporte para --git-api-token, mas não parece estar funcionando para mim. Talvez eu esteja enganado e essas alterações não foram incluídas na última versão ou estou fazendo outra coisa errada?

% 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

Comentários muito úteis

Aqui está uma solução inspirada em @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...
…

Todos 10 comentários

Olá @kurtharriger, não consigo reproduzir o problema. Você pode verificar seu token? Além disso, você pode tentar os binários oficiais, não os fornecidos pela brew?

Token verificado e atualizado e ainda o mesmo problema.

Como solução alternativa, posso baixar manualmente o arquivo .iso e salvá-lo em algum lugar específico. Onde devo salvá-lo para que a docker-machine encontre-o localmente e não tente baixá-lo novamente?

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

Funciona sem usar o token certo?

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

Token verificado e atualizado e ainda o mesmo problema.

Como alternativa, posso baixar manualmente o arquivo .iso e salvá-lo
em algum lugar específico. Onde devo salvá-lo para que a docker-machine
encontrá-lo localmente e não tentar baixá-lo novamente?

% docker-machine --version
docker-machine versão 0.5.5, build 02c4254

% docker-machine --github-api-token = $ GITHUB_TOKEN criar -d caixa virtual brilhante
Executando verificações de pré-criação ...
(Brightbox) Nenhum ISO Boot2Docker padrão encontrado localmente, baixando a versão mais recente ...
Erro ao criar máquina: Erro com verificação de pré-criação: Erro ao obter uma tag de versão da resposta da API do Github.
Você pode ter uma taxa limitada pelo Github.

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

-
Responda a este e-mail diretamente ou visualize-o no GitHub
https://github.com/docker/machine/issues/2765#issuecomment -169381828.

Não, nossa rede no trabalho sempre parece ser limitada. Provavelmente algum script rodando em algum lugar que não está usando um token de autenticação, então sempre precisamos fornecer um token de autenticação para o github.

Parece que a caixa de ferramentas do docker tem tudo empacotado, então eu baixei e instalei e ela copiou o boot2docker.iso nos lugares necessários para colocá-lo em funcionamento.

Estou tendo o mesmo problema ao usar o mesmo token que na seguinte solicitação de limite de taxa:

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

Estou na versão 0.5.6.

Também estou recebendo este erro agora. Funcionou bem ontem. Eu não acho que estou sendo limitado por taxas. Eu forneci um --github-api-token , mas não ajudou.

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

Aqui está uma solução inspirada em @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...
…

Aqui está uma solução inspirada em @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...
…

Obrigado cara. Isso funcionou para mim, mas foi necessário atualizar o url do boot2docker.iso no comando curl para a versão mais recente (e estável) disponível em https://github.com/boot2docker/boot2docker/releases/

Esta página foi útil?
0 / 5 - 0 avaliações