Azure devops nuget feeds
Hi
is there a way to connect to azure Devops nuget feeds? Tried username + access token as pasword and it didn't work for me (HTTP 401)
Cheers,
is there a way to connect to azure Devops nuget feeds? Tried username + access token as pasword and it didn't work for me (HTTP 401)

Cheers,
Comments
https://docs.microsoft.com/en-au/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate?view=vsts
From LINQPad's NuGet package manager, I went to settings, and entered the PAT into the password field. The username can be anything, such as ID.
It seems like linqPad refuses to authenticate with the V3 URIs.
I've tried:
https://mycompany.pkgs.visualstudio.com/_packaging/Feed/nuget/v3/index.json
https://mycompany.pkgs.visualstudio.com/_packaging/Feed/nuget/v3
With "Use Legacy Search Engine (Nuget V2)" checked and unchecked.
Everything works with this URI:
https://mycompany.pkgs.visualstudio.com/_packaging/Feed/nuget/v2
and "Use Legacy Search Engine (Nuget V2)" checked.
It would be nice if LinqPad just worked with the V3 URIs. Perhaps I'm doing something wrong too?
https://www.linqpad.net/Download.aspx#beta
Not sure why or if that was actually what made the difference for me but after changing from https://xyz.pkgs.visualstudio.com to https://pkgs.dev.azure.com it started working.
Hope this works for someone else too.
I did the following:
- Added PAT as per instructions above
- Put the PAT as password
- Used the BETA
That worked for me - i couldn't access it any other way.Hi,
I still experience the problem with Linqpad 6.5.5. It throws me an exception Unauthorized.
I tried with several combinations it with the PAT, user name and password and none worked.
Does anybody experience the same issue?
I have recently switched to LinqPad 6 (6.7.5 x64) and I'm experiencing this issue. We have an on-prem Azure DevOps instance. I've created a PAT with all scopes. I created a nuget feed in LinqPad and left the username blank and the password is the PAT token. I keep getting the authentication 401 error.
FYI, I tested this and without changing the feed at all the feed works in LinqPad 5 but not 6. I get the 401 error in LinqPad 6.
Have you re-started LINQPad after changing the username/password? (This is required by the NuGet API)
Hi,
I can confirm that using PAT in LinqPad 6 (v6.8.3) doesn't work , but the exact same configuration works in LinqPad 5 (v5.41.00). I have tried different configurations (v2, v3, PAT with and without username etc.), but no luck - still gets a 401. I hope this gets fixed soon, as I would like to use C# 8 features.
I still can't reproduce this error. My devops feed URI looks like this:
https://linqpad.pkgs.visualstudio.com/_packaging/doLINQPad/nuget/v3/index.json
The username box contains 'ID', although it seems anything can go here (as long as it's not blank).
The password box contains the PAT.
Note that you must restart LINQPad after editing the credentials - this is because the NuGet client library caches the credentials after they're first sent and there appears to be no way to clear that cache.
Had 401 error on v6.8.3 until I followed Joe's notes. 1. Ensure Id field has something in it, password is PAT. 2. Save. 3. Restart linqpad. All good!
Hi,
I still can't get it to work (now running version 6.9.15). However, I have a few things to add.
I have both version 5 and 6 installed at the same time. Changes to "Package Source" in one seems to affect the other. It looks like I don't have to put anything in the "Username" and "Password" fields in version 5 for it to work. But I still get the 401 (Unauthorized) in version 6. So I think this problem might not have anything to do with the PAT (for me at least).
What I have noticed is that the source shown in the message is different from the source in "Package Source". In stead of "https://[base path]/_packaging/[feed name]/nuget/v3/index.json" I get a message saying that "Failed to retrieve metadata from source 'https://[base path]/_packaging/[some guid]/v3/query2/?q=...'".
So LinqPad v6 seems to try to contact a source it doesn't have access to, whereas v5 does not.
I don't know if this helps at all, but I hope it does.
Got 5 and 6 here too. Same v6 as you. Both work for me. My V6 is an XCopy deploy not an install, but I dont know if that makes any difference ?
In my nuget setup I have my source as https://xxxx.pkgs.visualstudio.com/_packaging/xxxx/nuget/v3/index.json, I have "ID" (without quotes) as the Username and Personal Access Token from AzDevops for password.
HTH