Skip to content

[BUG]: npmAuthenticate@0 Post-job started failing #18245

Open
@kaimas50

Description

@kaimas50

Task name

npmAuthenticate

Task version

0.218.0

Environment type (Please select at least one enviroment where you face this issue)

  • Self-Hosted
  • Microsoft Hosted
  • VMSS Pool
  • Container

Azure DevOps Server type

dev.azure.com (formerly visualstudio.com)

Azure DevOps Server Version (if applicable)

No response

Operation system

ubuntu-latest

Task log

##[debug]Agent.ProxyUrl=undefined
##[debug]Agent.CAInfo=undefined
##[debug]Agent.ClientCert=undefined
##[debug]Agent.SkipCertValidation=undefined
##[debug]check path : /home/vsts/work/_tasks/npmAuthenticate_ad884ca2-732e-4b85-b2d3-ed71bcbd2788/0.218.0/task.json
##[debug]adding resource file: /home/vsts/work/_tasks/npmAuthenticate_ad884ca2-732e-4b85-b2d3-ed71bcbd2788/0.218.0/task.json
##[debug]system.culture=en-US
##[debug]SAVE_NPMRC_PATH=/home/vsts/work/1/npmAuthenticate/7av3Yv
##[debug]workingFile=/home/vsts/work/1/s/.npmrc
##[debug]workingFile=/home/vsts/work/1/s/.npmrc
##[debug]SAVE_NPMRC_PATH=/home/vsts/work/1/npmAuthenticate/7av3Yv
##[debug]Restoring file /home/vsts/work/1/s/.npmrc
##[debug]task result: Failed
##[error]Unhandled: EACCES: permission denied, open '/home/vsts/work/1/s/.npmrc'
##[debug]Processed: ##vso[task.issue type=error;]Unhandled: EACCES: permission denied, open '/home/vsts/work/1/s/.npmrc'
##[debug]Processed: ##vso[task.complete result=Failed;]Unhandled: EACCES: permission denied, open '/home/vsts/work/1/s/.npmrc'
##[error]Error: EACCES: permission denied, open '/home/vsts/work/1/s/.npmrc'
    at Object.openSync (node:fs:594:3)
    at Object.writeFileSync (node:fs:2207:35)
    at copyFile (/home/vsts/work/_tasks/npmAuthenticate_ad884ca2-732e-4b85-b2d3-ed71bcbd2788/0.218.0/node_modules/azure-pipelines-tasks-packaging-common-v3/util.js:20:8)
    at Object.restoreFileWithName (/home/vsts/work/_tasks/npmAuthenticate_ad884ca2-732e-4b85-b2d3-ed71bcbd2788/0.218.0/node_modules/azure-pipelines-tasks-packaging-common-v3/util.js:58:13)
    at /home/vsts/work/_tasks/npmAuthenticate_ad884ca2-732e-4b85-b2d3-ed71bcbd2788/0.218.0/npmauthcleanup.js:27:18
    at Generator.next (<anonymous>)
    at /home/vsts/work/_tasks/npmAuthenticate_ad884ca2-732e-4b85-b2d3-ed71bcbd2788/0.218.0/npmauthcleanup.js:8:71
    at new Promise (<anonymous>)
    at __awaiter (/home/vsts/work/_tasks/npmAuthenticate_ad884ca2-732e-4b85-b2d3-ed71bcbd2788/0.218.0/npmauthcleanup.js:4:12)
    at run (/home/vsts/work/_tasks/npmAuthenticate_ad884ca2-732e-4b85-b2d3-ed71bcbd2788/0.218.0/npmauthcleanup.js:18:12)
##[debug]Processed: ##vso[task.issue type=error;]Error: EACCES: permission denied, open '/home/vsts/work/1/s/.npmrc'
    at Object.openSync (node:fs:594:3)
    at Object.writeFileSync (node:fs:2207:35)
    at copyFile (/home/vsts/work/_tasks/npmAuthenticate_ad884ca2-732e-4b85-b2d3-ed71bcbd2788/0.218.0/node_modules/azure-pipelines-tasks-packaging-common-v3/util.js:20:8)
    at Object.restoreFileWithName (/home/vsts/work/_tasks/npmAuthenticate_ad884ca2-732e-4b85-b2d3-ed71bcbd2788/0.218.0/node_modules/azure-pipelines-tasks-packaging-common-v3/util.js:58:13)
    at /home/vsts/work/_tasks/npmAuthenticate_ad884ca2-732e-4b85-b2d3-ed71bcbd2788/0.218.0/npmauthcleanup.js:27:18
    at Generator.next (<anonymous>)
    at /home/vsts/work/_tasks/npmAuthenticate_ad884ca2-732e-4b85-b2d3-ed71bcbd2788/0.218.0/npmauthcleanup.js:8:71
    at new Promise (<anonymous>)
    at __awaiter (/home/vsts/work/_tasks/npmAuthenticate_ad884ca2-732e-4b85-b2d3-ed71bcbd2788/0.218.0/npmauthcleanup.js:4:12)
    at run (/home/vsts/work/_tasks/npmAuthenticate_ad884ca2-732e-4b85-b2d3-ed71bcbd2788/0.218.0/npmauthcleanup.js:18:12)
Finishing: Authenticate npm

Relevant log output

##[error]Unhandled: EACCES: permission denied, open '/home/vsts/work/1/s/.npmrc'

Aditional info

Previously runs with npmAuthenticate@0 (0.218.0) succeeded. Now `Post-job: Authenticate npm` fails every time.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions