Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -280,16 +280,17 @@ Otherwise start the container that should be registered and execute
SUSEConnect -e <youremailaddress> -r <yourregistrationcode>
```

In case you have a registration code that hasn't otherwise be used, you
can use the USERNAME "regcode" and the given registration code as password.
In case you have an unused registration code, you can connect with the username "regcode" and use the registration code as the password.

For interactive use of containers you can also
pass the obtained username and password via environment variables
pass the obtained username, password and system token via environment variables:

```bash
docker run -e SCC_CREDENTIAL_USERNAME=<credential_username> \
-e SCC_CREDENTIAL_PASSWORD=<credential_password> \
-e SCC_CREDENTIAL_SYSTEM_TOKEN=<system_token> \
my-image
```

# License

Expand Down
2 changes: 2 additions & 0 deletions internal/credentials.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,12 @@ func (cr *Credentials) locations() []string {
func (cr *Credentials) onLocationsNotFound() bool {
env_user := os.Getenv("SCC_CREDENTIAL_USERNAME")
env_pass := os.Getenv("SCC_CREDENTIAL_PASSWORD")
env_system_token := os.Getenv("SCC_CREDENTIAL_SYSTEM_TOKEN")

if env_user != "" && env_pass != "" {
cr.Username = env_user
cr.Password = env_pass
cr.SystemToken = env_system_token
return true
}

Expand Down
Loading