Skip to content

Commit

Permalink
client/driver: use correct repo address when using docker-credential …
Browse files Browse the repository at this point in the history
…helper
  • Loading branch information
nickethier committed May 8, 2018
1 parent 517d0ee commit 505f8a1
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions client/driver/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -2130,13 +2130,15 @@ func authFromHelper(helperName string) authBackend {
helper := dockerAuthHelperPrefix + helperName
cmd := exec.Command(helper, "get")

// Ensure that the HTTPs prefix exists
if !strings.HasPrefix(repo, "https://") {
repo = fmt.Sprintf("https://%s", repo)
repoInfo, err := parseRepositoryInfo(repo)
if err != nil {
return nil, err
}

cmd.Stdin = strings.NewReader(repo)
// Ensure that the HTTPs prefix exists
repoAddr := fmt.Sprintf("https://%s", repoInfo.Hostname())

cmd.Stdin = strings.NewReader(repoAddr)
output, err := cmd.Output()
if err != nil {
switch err.(type) {
Expand Down

0 comments on commit 505f8a1

Please sign in to comment.