Sha256: f16623a643a21456d051d1c75454406533bcca6c2d4e19ad44b4d7bca9efe975
Contents?: true
Size: 666 Bytes
Versions: 11
Compression:
Stored size: 666 Bytes
Contents
module Kontena::Cli::ExternalRegistries class AddCommand < Clamp::Command include Kontena::Cli::Common def execute require 'highline/import' default_url = 'https://index.docker.io/v1/' require_api_url require_current_grid token = require_token username = ask("Username: ") password = ask("Password: ") { |q| q.echo = "*" } email = ask("Email: ") url = ask("URL [#{default_url}]: ") url = default_url if url.strip == '' data = { username: username, password: password, email: email, url: url } client(token).post("grids/#{current_grid}/external_registries", data) end end end
Version data entries
11 entries across 11 versions & 1 rubygems