Skip to content

Commit a0a1e31

Browse files
authored
Unset accessToken if repo credentials are provided (#86)
* Unset accessToken if repo credentials are provided * check global `username` and `password` variables.
1 parent 2506062 commit a0a1e31

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cmd/helmpush/main.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,11 @@ func (p *pushCmd) push() error {
272272
password = p.password
273273
}
274274

275+
// unset accessToken if repo credentials are provided
276+
if username != "" && password != "" {
277+
p.accessToken = ""
278+
}
279+
275280
// in case the repo is stored with cm:// protocol, remove it
276281
var url string
277282
if p.useHTTP {

0 commit comments

Comments
 (0)