Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

##[error]Error: Secrets cannot contain multiple lines - task: npmAuthenticate@0

We have a pipeline that has the task type: npmAuthenticate@0, which when executed shows the following error: ##[error]Error: Secrets cannot contain multiple lines.

The service connection assigned in the "customEndpoint" property is of type NPM. It started to fail today 06-20-2024 from 10:00 GTM-5.

Does anyone else have the same problem?

enter image description here

We created a new service connection, but the problem persists.

like image 471
bertinnv Avatar asked Oct 13 '25 01:10

bertinnv


2 Answers

I tested the npmAuthenticate@0 task in pipeline, and I found it works in my pipeline. I set the "customEndpoint" property with my NPM service connection.

After comparing my log with your screenshot, I found my task version is 0.238.2, and yours is 0.241.1. The update of the task was merged last week and it seems that the updated version has not yet been applied to all organizations.

task

Considering that your task was successful before, it is likely that the problem is caused by the task version update.

You can check whether the task version of your previous successful runs is version 0.238.2. If so, you can temporarily specify to use the old version of the task as a workaround until the issue is fixed.

          - task: [email protected]
            inputs:
              workingFile: '.npmrc'
              customEndpoint: 'NPM service connection'

like image 175
Miao Tian Avatar answered Oct 14 '25 15:10

Miao Tian


Same problem here. It was working fine until 18/06 and stopped woking yesterday.

I'll try specifying the version.

Edit¹ More info: 18/06: enter image description here

20/06: enter image description here

Edit² after test: After downgrading the task version The task succeded. Thank you!

like image 30
GSFZamai Avatar answered Oct 14 '25 13:10

GSFZamai