Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ignore failed sources to possible arguments #638

Merged
merged 3 commits into from
Mar 17, 2022

Conversation

matteopey
Copy link
Contributor

Hi,
in my company we are facing the following issue when using the gitversion/setup task on Azure Devops

/_work/_tool/dotnet/sdk/5.0.406/NuGet.targets(131,5): error : Unable to load the service index for source [private nuget repo]. 

Tool 'gitversion.tool' failed to install. This failure may have been caused by:
/_work/_tool/dotnet/sdk/5.0.406/NuGet.targets(131,5): error :   GSSAPI operation failed with error - Unspecified GSS failure.  Minor code may provide more information (SPNEGO cannot find mechanisms to negotiate).

This happens because for private repositories dotnet needs authentication to be able to read them and because the agent that is running this task has a global nuget configuration that we cannot ignore.

We workaround this issue by directly installing the tool with a bash command

dotnet tool install GitVersion.Tool --version 5.9.0 --ignore-failed-sources

This parameter does what it says: ignore errors on failed sources, which in our case is fine because the tool is not present in our private repository.

This PR add the possibility to pass a new argument to the task that will add the parameter to the argument list of the dotnet command.
The default value is false, so it will not change the current behaviour of the task.

@arturcic
Copy link
Member

@arturcic arturcic enabled auto-merge (rebase) March 17, 2022 08:15
@arturcic arturcic merged commit 3ae0279 into GitTools:main Mar 17, 2022
@mergify
Copy link
Contributor

mergify bot commented Mar 17, 2022

Thank you @matteopey for your contribution!

@arturcic
Copy link
Member

@matteopey I will create a new release today

@matteopey
Copy link
Contributor Author

Thanks a lot @arturcic

@arturcic
Copy link
Member

arturcic commented Mar 17, 2022

@matteopey the new extension was published

This was referenced Mar 17, 2022
This was referenced Mar 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants