【发布时间】:2017-11-21 23:28:25
【问题描述】:
我在 jenkins 中运行的脚本有时包含以下命令:
npm update fhir-types --force
结果是:
C:\Sources\iw-next\iw.next-ui>npm update fhir-types --force npm WARN 使用 --force 我当然希望你知道你在做什么。 npm 错误!代码 128 npm 错误!命令失败:C:\Program Files\Git\cmd\git.EXE 克隆 --depth=1 -q -b dev https://bitbucket.org/asd/fhir-types.git C:\Windows\system32\config\systemprofile\AppData\Roaming\npm-cache_cacache\tmp\git-clone-1b2dca91 --config core.longpaths=true npm 错误!警告:找不到模板 C:\Windows\TEMP\pacote-git-template-tmp\git-clone-fd08367f npm ERR! 远程:无效的用户名或密码。如果您通过第三方登录 服务,您必须确保在您的帐户中设置了帐户密码 帐户资料。 npm 错误!致命:身份验证失败 'https://bitbucket.org/asd/fhir-types.git/' npm 错误!
npm 错误!可以在以下位置找到此运行的完整日志:npm ERR!
C:\Windows\system32\config\systemprofile\AppData\Roaming\npm-cache_logs\2017-11-21T07_55_14_306Z-debug.log
当我在本地运行它时,它可以工作 - 在我运行此更新之前,是否可以在命令行中为 git 更改用户和密码?
【问题讨论】:
-
fatal: Authentication failed,在 Jenkins 作业中运行npm update的用户似乎无权访问远程存储库。 -
在 jenkins 中配置的用于连接到该从节点的用户与我使用 RDC 手动连接时使用的用户相同 - 当我手动连接时它可以工作 - 当我从 jenkins 运行时它不会 - 你知道我可以在 npm 更新之前使用命令行手动配置用户的方法吗?