Skip to content

Commit c9cb0ac

Browse files
authored
Merge pull request #192 from docker/fix-login-issue
Fix Login issue #191
2 parents a86e5a9 + 6b376a1 commit c9cb0ac

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: pkg/hub/client.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ func (c *Client) Login(username string, password string, twoFactorCodeProvider f
214214
body := bytes.NewBuffer(data)
215215

216216
// Login on the Docker Hub
217-
req, err := http.NewRequest("POST", c.domain+LoginURL, ioutil.NopCloser(body))
217+
req, err := http.NewRequest("POST", c.domain+LoginURL, body)
218218
if err != nil {
219219
return "", "", err
220220
}
@@ -270,7 +270,7 @@ func (c *Client) getTwoFactorToken(token string, twoFactorCodeProvider func() (s
270270
body := bytes.NewBuffer(data)
271271

272272
// Request 2FA on the Docker Hub
273-
req, err := http.NewRequest("POST", c.domain+TwoFactorLoginURL, ioutil.NopCloser(body))
273+
req, err := http.NewRequest("POST", c.domain+TwoFactorLoginURL, body)
274274
if err != nil {
275275
return "", "", err
276276
}

0 commit comments

Comments
 (0)