Skip to content

Commit

Permalink
fix detecting private images in Github's Docker Registry (#2012)
Browse files Browse the repository at this point in the history
  • Loading branch information
sgalsaleh committed Jul 28, 2021
1 parent 71e37dd commit 00a1416
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/image/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,11 @@ func isLoginRequired(err error) bool {
if strings.Contains(cause.Error(), "invalid status code from registry 403") {
return true
}
// GitHub's Docker registry (which used the namespace docker.pkg.github.com) could return "denied" as the error message
// in some cases when the request is unauth'ed or has invalid credentials.
if cause.Error() == "denied" {
return true
}
return false
}
}
Expand Down

0 comments on commit 00a1416

Please sign in to comment.