Open pamiel opened 5 years ago
Same error. Can not push in anonymous mode
If I push by specifying a user and a passord
helm nexus-push nexus mychart-0.2.1.tgz -u admin -p secret
I got another similar error :
.helm/plugins/helm-nexus-push.git/push.sh: line 126: AUTH: unbound variable
Hi,
Same error. My workaround is to set --password "". Not very clean but I can use login cmd to hide password
helm nexus-push nexus mychart-0.2.1.tgz --password ""
Same here.
I was trying to use my user/pwd declared with helm nexus-push login
(neat !)
Script is failing due to the "-u" option specified with set -ueo pipefail
when some undefined variables are tested.
Fixed it like by editing push.sh On MacOS, `vi ~/Library/helm/plugins/helm-nexus-push.git/push.sh``
Changed this:
declare USERNAME
declare PASSWORD
with this
declare USERNAME=""
declare PASSWORD=""
in order to provide default values.
What are you trying to do? Install the plugin and login to my Nexus repo. When running
helm nexus-push my-repo login -u user
, I receive an error/root/.helm/plugins/helm-nexus-push/push.sh: line 90: PASSWORD: unbound variable
What feature or behavior is this required for? login to the Nexus repo using the plugin
How could we solve this issue? (Not knowing is okay!) It looks to be due to the declaration of the PASSWORD variable:
declare PASSWORD
(https://github.com/sonatype-nexus-community/helm-nexus-push/blob/master/push.sh#L24) The issue is solved (workarounded ?) by adding an ending=
to the declaration, ensuring that the PASSWORD variable is "set" before being acessed in line 90 of the script. For safety, I added the same ending=
for lines 23 (USERNAME
variable). Strangely, nothing bad happens for the similar declarations of variablesCMD
,AUTH
, andCHART
that I did not touched.Anything else?