table of contents
OC REGISTRY(1) | June 2016 | OC REGISTRY(1) |
NAME¶
oc registry login - Log in to the integrated registry
SYNOPSIS¶
oc registry login [OPTIONS]
DESCRIPTION¶
Log in to the OpenShift integrated registry.
This logs your local Docker client into the OpenShift integrated registry using the external registry name (if configured by your administrator). If you are logged in to the server using a client certificate the command will report an error because container registries do not generally allow client certificates.
As an advanced option you may specify the credentials to login with using --auth-basic with USER:PASSWORD.
You may specify an alternate file to write credentials to with --to instead of .docker/config.json in your home directory.
To detect the registry hostname the client will attempt to find an image stream in the current namespace or the openshift namespace and use the status fields that indicate the registry hostnames. If no image stream is found or if you do not have permission to view image streams you will have to pass the --registry flag with the desired host name.
You may also pass the --registry flag to login to the integrated registry but with a custom DNS name, or to an external registry. Note that in absence of --auth-basic=USER:PASSWORD, the authentication token from the connected kubeconfig file will be recorded as the auth entry in the credentials file (defaults to Docker config.json) for the passed registry value.
OPTIONS¶
--auth-basic=""
Provide credentials in the form 'user:password' to authenticate
(advanced)
--insecure=false
Bypass HTTPS certificate verification when checking the registry login.
--registry=""
An alternate domain name and port to use for the registry, defaults to the
cluster's configured external hostname.
-a, --registry-config=""
The location of the file your credentials will be stored in. Alternatively
REGISTRY_AUTH_FILE env variable can be also specified. Defaults to
${XDG_RUNTIME_DIR}/containers/auth.json or /run/containers/${UID}/auth.json.
Default can be changed via the REGISTRY_AUTH_PREFERENCE env variable
(deprecated) to a "docker" value to prioritizes Docker credentials
over Podman's.
--skip-check=false
Skip checking the credentials against the registry.
--to=""
The location of the file your credentials will be stored in. Alternatively
REGISTRY_AUTH_FILE env variable can be also specified. Defaults to
${XDG_RUNTIME_DIR}/containers/auth.json or /run/containers/${UID}/auth.json.
Default can be changed via the REGISTRY_AUTH_PREFERENCE env variable
(deprecated) to a "docker" value to prioritizes Docker credentials
over Podman's.
OPTIONS INHERITED FROM PARENT COMMANDS¶
--as=""
Username to impersonate for the operation. User could be a regular user or a
service account in a namespace.
--as-group=[]
Group to impersonate for the operation, this flag can be repeated to specify
multiple groups.
--as-uid=""
UID to impersonate for the operation.
--cache-dir="/home/abuild/.kube/cache"
Default cache directory
--certificate-authority=""
Path to a cert file for the certificate authority
--client-certificate=""
Path to a client certificate file for TLS
--client-key=""
Path to a client key file for TLS
--cluster=""
The name of the kubeconfig cluster to use
--context=""
The name of the kubeconfig context to use
--disable-compression=false
If true, opt-out of response compression for all requests to the server
--insecure-skip-tls-verify=false
If true, the server's certificate will not be checked for validity. This will
make your HTTPS connections insecure
--kubeconfig=""
Path to the kubeconfig file to use for CLI requests.
--match-server-version=false
Require server version to match client version
-n, --namespace=""
If present, the namespace scope for this CLI request
--profile="none"
Name of profile to capture. One of
(none|cpu|heap|goroutine|threadcreate|block|mutex)
--profile-output="profile.pprof"
Name of the file to write the profile to
--request-timeout="0"
The length of time to wait before giving up on a single server request.
Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h).
A value of zero means don't timeout requests.
-s, --server=""
The address and port of the Kubernetes API server
--tls-server-name=""
Server name to use for server certificate validation. If it is not provided,
the hostname used to contact the server is used
--token=""
Bearer token for authentication to the API server
--user=""
The name of the kubeconfig user to use
--warnings-as-errors=false
Treat warnings received from the server as errors and exit with a non-zero
exit code
EXAMPLE¶
# Log in to the integrated registry
oc registry login
# Log in to different registry using BASIC auth credentials
oc registry login --registry quay.io/myregistry --auth-basic=USER:PASS
SEE ALSO¶
HISTORY¶
June 2016, Ported from the Kubernetes man-doc generator
Openshift CLI User Manuals | Openshift |