Azure-devops-docs: Both the parameters are not optional, description needs to be better

Created on 27 Jan 2019  Â·  12Comments  Â·  Source: MicrosoftDocs/azure-devops-docs

If you add this task without providing a parameter, it errors out. I'm not sure I understand what this task does either, it's not clear whether this will provide authentication details for my Azure Devops private repositories or if it is used for something else.


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Pri2 devops-cictech devopprod doc-bug stale-issue

Most helpful comment

Any update to this? I am seeing an error trying to use this:

[error]Error: The file you selected to authenticate (/home/vsts/work/1/s) is not a valid .npmrc file.

The documentation states that workingFile is optional. I am trying to use this task to use a Service Connection to publish to npmjs.

All 12 comments

Hi @atrauzzi , I'm going to add @mitchdenny here for some help. Mitch, how is it that both of these properties are optional? As far as what this task does, it's specifically for authenticating npm with task runners like gulp or Grunt within an Azure DevOps Pipeline. If you're using the actual npm task to do your work in a pipeline, you won't need to use this authenticate task.

@steved0x can you provide an example of the error you are seeing? It might just be some assumptions we have baked into the task.

I think @mitchdenny meant to tag the issue author, @atrauzzi :)

Ah yes! Sorry.

@mitchdenny

If you add this task without providing a parameter...

Most of the confusion probably arises from people expecting the behaviour from https://github.com/Microsoft/azure-pipelines-tasks/issues/9584 .

So it might be a good idea to document that once it's implemented as well. Personally, I don't know why any parameters are required for this task. If none are provided, just throw an .npmrc in the agent users home directory.

Adding @elbatk this is probably something you want to consider around auth :)

The first one is indeed required, but the second is optional (custom endpoints only need to be specified for feeds in a different organization or third party feeds, not feeds in the current organization)

Yeah, but it shouldn't be. Most people just want to add authentication to the current series of tasks.

It should support having no parameters so that the file can be created automatically. This alleviates the burden of having to explicitly manage the file.

Any update to this? I am seeing an error trying to use this:

[error]Error: The file you selected to authenticate (/home/vsts/work/1/s) is not a valid .npmrc file.

The documentation states that workingFile is optional. I am trying to use this task to use a Service Connection to publish to npmjs.

I suggest further clarifying the use case for accessing private and public feeds as well as single or multiple feeds. For example, it would be nice to understand how to reference multiple private feeds.

Use packages from this Azure Artifacts/TFS registry:
Select this option to use one Azure Artifacts feed in the same organization/collection as the build.

It would be helpful to know how multiple private feeds are authenticated when they are inside the same organization and also outside in a different organization. Both are valid for large enterprises, such as Microsoft.

This issue hasn't been updated in more than 180 days, so we've closed it. If you feel the issue is still relevant and needs fixed, please reopen it and we'll take another look. We appreciate your feedback and apologize for any inconvenience.

Yikes, that's a bad automation.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dannyvv picture dannyvv  Â·  3Comments

kieronlanning picture kieronlanning  Â·  3Comments

atrauzzi picture atrauzzi  Â·  3Comments

sevaa picture sevaa  Â·  3Comments

Naphier picture Naphier  Â·  3Comments