cosign icon indicating copy to clipboard operation
cosign copied to clipboard

COSIGN_REPOSITORY does not allow using a port in the path

Open cctechwiz opened this issue 2 years ago • 1 comments

Description

Getting the error

$COSIGN_REPOSITORY: repository can only contain the characters `abcdefghijklmnopqrstuvwxyz0123456789_-./`

Our repository has a port in it e.g. repo-app.datacenter.net:5001.

Cosign is able to handle that just fine when it infers the repository from the image name, but when setting the env var COSIGN_REPOSITORY it fails. I feel like this might just be a bug with parsing that env var vs using the image path to decide which repository to use.

Version

[ 16:35:58 ] ❯ cosign version
  ______   ______        _______. __    _______ .__   __.
 /      | /  __  \      /       ||  |  /  _____||  \ |  |
|  ,----'|  |  |  |    |   (----`|  | |  |  __  |   \|  |
|  |     |  |  |  |     \   \    |  | |  | |_ | |  . `  |
|  `----.|  `--'  | .----)   |   |  | |  |__| | |  |\   |
 \______| \______/  |_______/    |__|  \______| |__| \__|
cosign: A tool for Container Signing, Verification and Storage in an OCI registry.

GitVersion:    2.0.2
GitCommit:     871448050b924a7946ebe47678f23aae09ef432d
GitTreeState:  "clean"
BuildDate:     2023-04-24T17:31:42Z
GoVersion:     go1.20.3
Compiler:      gc
Platform:      darwin/arm64

cctechwiz avatar Jun 01 '23 22:06 cctechwiz