如何在GitLab npm注册表中发布我的npm包?
我制定了一个黄金试验计划来测试GitLab NPM注册表功能如何在GitLab npm注册表中发布我的npm包?,npm,gitlab,npm-publish,Npm,Gitlab,Npm Publish,我制定了一个黄金试验计划来测试GitLab NPM注册表功能 创建了一个名为“bar”的gitlab prohect 创建了一个文件来生成令牌:在名为auth.txt的文件中,我写了一行: grant_type=password&username=my gitlab username&password=my gitlab password 使用以下命令生成令牌: curl-d“@auth.txt”-X POST http://gitlab.com/oauth/token 在.npmrc文件中,指
grant_type=password&username=my gitlab username&password=my gitlab password
curl-d“@auth.txt”-X POST http://gitlab.com/oauth/token
gitlab.com/api/v4/projects/my gitlab项目id/packages/npm/:authToken=my Generated token
console.log('test')
.npmrc
app.js
package.json
npm——详细发布
npm动词cli['/usr/bin/node','/usr/local/bin/npm','-verbose','publish']
npm信息使用npm@6.14.2
npm信息使用node@v13.11.0
npm动词npm会话febf284b8dfbe40b
npm动词publish['.]
npm信息生命周期@foo/bar@1.0.0~prepublish:@foo/bar@1.0.0
npm信息生命周期@foo/bar@1.0.0~prepare:@foo/bar@1.0.0
npm信息生命周期@foo/bar@1.0.0~prepublishOnly:@foo/bar@1.0.0
npm信息生命周期@foo/bar@1.0.0~prepack:@foo/bar@1.0.0
npm信息生命周期@foo/bar@1.0.0~postpack:@foo/bar@1.0.0
npm通知
npm通知逐字逐句执行已发布的示例。在您提供的文本中,我发现publishConfig中只有“注册表”:
,但示例使用了“@foo:registry”:
。看起来您有点偏离了脚本,没有运行指南中显示的npm config set
命令。您找到解决方案了吗?我也有同样的问题。因此,在日志和空包列表中成功发布。HTTP 301被永久移动。尝试使用HTTPS而不是HTTPDo来逐字记录已发布的示例。在您提供的文本中,我发现publishConfig中只有“注册表”:
,但示例使用了“@foo:registry”:
。看起来您有点偏离了脚本,没有运行指南中显示的npm config set
命令。您找到解决方案了吗?我也有同样的问题。因此,在日志和空包列表中成功发布。HTTP 301被永久移动。尝试使用HTTPS而不是HTTP
.npmrc
app.js
package.json