我有一个项目,我们使用 font awesome 5 库。我按照此处编写的说明操作,并添加了一个.npmrc带有我的身份验证令牌的文件。
将其放入回购中是一种安全的行为吗?我希望开发人员可以访问它,但是如果 repo 公开,我们可能会暴露令牌。
在这种情况下,最佳做法是什么?
我在 GitHub 企业存储库上使用语义版本操作。直到最近它都工作正常,但开始因此错误而失败
Error: Command failed: npm ci --only=prod
npm ERR! code E401
npm ERR! Unable to authenticate, need: Basic realm="GitHub Package Registry"
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2021-08-23T10_41_00_344Z-debug.log
at ChildProcess.exithandler (child_process.js:295:12)
at ChildProcess.emit (events.js:210:5)
at maybeClose (internal/child_process.js:1021:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5) {
killed: false,
code: 1,
signal: null,
cmd: 'npm ci --only=prod',
stdout: '',
stderr: 'npm ERR! code E401\n' +
'npm ERR! Unable to authenticate, need: Basic realm="GitHub …Run Code Online (Sandbox Code Playgroud)