version-checker icon indicating copy to clipboard operation
version-checker copied to clipboard

Error when using the Harbor as selfhosted.

Open aloisiobilck opened this issue 2 years ago • 0 comments

I have set up selfhosted for Harbor, but it is showing an error. Here are my customized values:

selfhosted: 
- name: HARBOR
   host: harbor.mycompany.com
   username: <myUser>
   password: <myPassowrd>

Below is the log with the error:

Error: failed to setup image registry clients: failed to create selfhosted client "harbor.mycompany.com": failed to setup token auth: failed to send basic auth request "harbor.mycompany.com/v2/token": Post "harbor.mycompany.com/v2/token": unsupported protocol scheme ""
Usage:
  version-checker [flags]

App flags:

  -c, --image-cache-timeout duration     The time for an image version in the cache to be considered fresh. Images will be rechecked after this interval. (default 30m0s)
  -v, --log-level string                 Log level (debug, info, warn, error, fatal, panic). (default "info")
  -m, --metrics-serving-address string   Address to serve metrics on at the /metrics path. (default "0.0.0.0:8080")
  -a, --test-all-containers              If enabled, all containers will be tested, unless they have the annotation "enable.version-checker/${my-container}=false".

Auth flags:

      --acr-password string               Password to authenticate with azure container registry (VERSION_CHECKER_ACR_PASSWORD).
      --acr-refresh-token string          Refresh token to authenticate with azure container registry. Cannot be used with username/password (VERSION_CHECKER_ACR_REFRESH_TOKEN).
      --acr-username string               Username to authenticate with azure container registry (VERSION_CHECKER_ACR_USERNAME).
      --docker-password string            Password to authenticate with docker registry (VERSION_CHECKER_DOCKER_PASSWORD).
      --docker-token string               Token to authenticate with docker registry. Cannot be used with username/password (VERSION_CHECKER_DOCKER_TOKEN).
      --docker-username string            Username to authenticate with docker registry (VERSION_CHECKER_DOCKER_USERNAME).
      --ecr-access-key-id string          ECR access key ID for read access to private registries (VERSION_CHECKER_ECR_ACCESS_KEY_ID).
      --ecr-secret-access-key string      ECR secret access key for read access to private registries (VERSION_CHECKER_ECR_SECRET_ACCESS_KEY).
      --ecr-session-token string          ECR session token for read access to private registries (VERSION_CHECKER_ECR_SESSION_TOKEN).
      --gcr-token string                  Access token for read access to private GCR registries (VERSION_CHECKER_GCR_TOKEN).
      --quay-token string                 Access token for read access to private Quay registries (VERSION_CHECKER_QUAY_TOKEN).
      --selfhosted-password string        Password is authenticate with a selfhosted registry (VERSION_CHECKER_PASSWORD).
      --selfhosted-registry-host string   Full host of the selfhosted registry. Include http[s] scheme (VERSION_CHECKER_HOST
      --selfhosted-token string           Token to authenticate to a selfhosted registry. Cannot be used with username/password (VERSION_CHECKER_TOKEN).
      --selfhosted-username string        Username is authenticate with a selfhosted registry (VERSION_CHECKER_USERNAME).

Kubernetes flags:

      --as string                      Username to impersonate for the operation
      --as-group stringArray           Group to impersonate for the operation, this flag can be repeated to specify multiple groups.
      --cache-dir string               Default cache directory (default "/root/.kube/cache")
      --certificate-authority string   Path to a cert file for the certificate authority
      --client-certificate string      Path to a client certificate file for TLS
      --client-key string              Path to a client key file for TLS
      --cluster string                 The name of the kubeconfig cluster to use
      --context string                 The name of the kubeconfig context to use
      --insecure-skip-tls-verify       If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure
      --kubeconfig string              Path to the kubeconfig file to use for CLI requests.
  -n, --namespace string               If present, the namespace scope for this CLI request
      --request-timeout string         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. (default "0")
  -s, --server string                  The address and port of the Kubernetes API server
      --tls-server-name string         Server name to use for server certificate validation. If it is not provided, the hostname used to contact the server is used
      --token string                   Bearer token for authentication to the API server
      --user string                    The name of the kubeconfig user to use

error: failed to setup image registry clients: failed to create selfhosted client "harbor.mycompany.com": failed to setup token auth: failed to send basic auth request "harbor.mycompany.com/v2/token": Post "harbor.mycompany.com/v2/token": unsupported protocol scheme ""

aloisiobilck avatar Mar 30 '22 08:03 aloisiobilck