Skip to content

Commit

Permalink
internal: Skip the docker auth generation on RMT
Browse files Browse the repository at this point in the history
Fixes bsc#1231185

Signed-off-by: Miquel Sabaté Solà <[email protected]>
  • Loading branch information
mssola committed Oct 8, 2024
1 parent 56d6ac2 commit 86a79cd
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions internal/connect/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -387,8 +387,14 @@ func announceOrUpdate(quiet bool) error {
}

if err = cred.CreateCredentials(login, password, "", cred.SystemCredentialsPath(CFG.FsRoot)); err == nil {
util.Debug.Print("\nAdding SUSE registry system authentication configuration ...")
setupRegistryAuthentication(login, password)
// If the user is authenticated against the SCC, then setup the Docker
// Registry configuration for the system. Otherwise, if the system is
// behind a proxy (e.g. RMT), this step might fail and it's best to
// avoid it (see bsc#1231185).
if CFG.IsScc() {
util.Debug.Print("\nAdding SUSE registry system authentication configuration ...")
setupRegistryAuthentication(login, password)
}
}
return err
}
Expand All @@ -405,14 +411,9 @@ func UpToDate() bool {
return upToDate()
}

// URLDefault returns true if using https://scc.suse.com
func URLDefault() bool {
return CFG.BaseURL == defaultBaseURL
}

func printInformation(action string, jsonOutput bool) {
var server string
if URLDefault() {
if CFG.IsScc() {
server = "SUSE Customer Center"
} else {
server = "registration proxy " + CFG.BaseURL
Expand Down

0 comments on commit 86a79cd

Please sign in to comment.