GH Action 要求对 npm install 进行身份验证

时间:2021-02-06 04:14:17

标签: node.js github npm github-actions

github 上有一个公共仓库,在 npm 上有对应的包,两者都是公共的。在以前的建筑物中,每次在 main 分支上合并新提交时,GitHub Action 都会发布包。

现在的问题是 workflow 不工作,因为 npm install 失败,因为它要求身份验证。

这是错误堆栈:

Run npm install
npm ERR! code E401
npm ERR! Incorrect or missing password.
npm ERR! If you were trying to login, change your password, create an
npm ERR! authentication token or enable two-factor authentication then
npm ERR! that means you likely typed your password in incorrectly.
npm ERR! Please try again, or recover your password at:
npm ERR!     https://www.npmjs.com/forgot
npm ERR! 
npm ERR! If you were doing some other operation then your saved credentials are
npm ERR! probably out of date. To correct this please try logging in again with:
npm ERR!     npm login

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/runner/.npm/_logs/2021-02-06T03_46_34_194Z-debug.log
Error: Process completed with exit code 1.

这些是依赖项:

 "dependencies": {
        "amqplib": "^0.6.0",
        "body-parser": "^1.18.2",
        "cors": "^2.8.4",
        "express": "^4.17.1",
        "express-fileupload": "^1.1.4",
        "gridfs-stream": "^1.1.1",
        "http-status-codes": "^2.1.4",
        "moment": "^2.24.0",
        "mongoose": "^5.11.8",
        "multer": "^1.4.1",
        "redis": "^3.0.2",
        "reflect-metadata": "^0.1.10"
    },
    "devDependencies": {
        "@commitlint/cli": "^11.0.0",
        "@commitlint/config-conventional": "^11.0.0",
        "@types/amqplib": "^0.5.17",
        "@types/body-parser": "^1.16.7",
        "@types/cors": "^2.8.3",
        "@types/express": "^4.17.9",
        "@types/gridfs-stream": "^0.5.30",
        "@types/multer": "^1.3.7",
        "@types/node": "^14.14.16",
        "@types/redis": "^2.8.6",
        "del": "^6.0.0",
        "gulp": "^4.0.2",
        "gulp-exec": "^5.0.0",
        "gulp-string-replace": "^1.1.2",
        "husky": "^4.3.8",
        "merge-stream": "^2.0.0",
        "typedoc": "^0.19.2",
        "typescript": "^4.0.0"
    }

0 个答案:

没有答案