Nexus IQ 从 --password-stdin 读取密码

时间:2021-02-09 07:42:39

标签: linux nexus sonatype

我在 linux 环境中运行 Nexus IQ 扫描。反正有没有从 --password-stdin 或类似的东西中读取密码?我们担心密码在 bash 历史记录中是明文形式。

java -jar ./nexus-iq-cli-1.75.0-01.jar -X -i "APPGNL" -a ${username}:${password} -s ${nexus_iq_url} ${docker_image_name}.tar

2 个答案:

答案 0 :(得分:0)

我了解您想从文件中读取密码。在您的命令中,您可以将 ${password} 替换为 $(cat /password/directory)

答案 1 :(得分:0)

这里有 2 个可能的选择:

--pki-身份验证 委托给JVM进行认证

https://help.sonatype.com/integrations/nexus-iq-cli#NexusIQCLI-Parameters

或者,这可能有助于隐藏凭据。不过我不确定它们是否会出现在日志中。

java -jar ./nexus-iq-cli-.jar @cli-auth.txt -i Test123 -s http://localhost:8070 -t build ./sample-application.zip

https://help.sonatype.com/integrations/nexus-iq-cli#NexusIQCLI-LoadingParametersFromFileLoadingParametersfromaFile

相关问题