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
TFS/VSTS Package Management authentication #13
Comments
This is of course a great suggestion. We need to investigate how we can adapt the authentication procedure from the npm task to yarn https://github.com/Microsoft/vsts-tasks/blob/master/Tasks/Npm/npmtask.ts#L190 . This is a priority one for us. |
Looks like the code you want to be looking at is in https://github.com/Microsoft/vsts-tasks/blob/master/Tasks/Npm/npmregistry.ts |
We can't switch to yarn on our build server because of this :( |
Happy to accept a PR is anyone has the time to work on this. |
@sandorfr Would have loved to work on this. But I lack the context. |
I might take a look but need to find some time |
I adjusted the roadmap, as I'm focused on this issue right now. This is basically around the corner, but I'm running into issues similar to this yarnpkg/yarn#678 . It seems like it might be necessary to generate a yarnrc in addition to npmrc. |
I've pushed a new major version including VSTS feed support. |
Broken for me. npm install works fined, yarn install yields 401 with VSTS feeds. Also getting lots of warnings:
I have tried with Using @cryza's method works fine. |
Can you share de debug log?
Le mer. 13 sept. 2017 à 20:15, Mardoxx <notifications@github.com> a écrit :
… Broken for me. npm install works fined, yarn install yields 401 with VSTS
feeds.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#13 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACiXpqOK14MujuhZ2J-JDnzLFquj2kMXks5sh6tTgaJpZM4M41-k>
.
|
@sandorfr weird, it's working now. I was having issues with VSTS feeds locally too so perhaps this was unrelated. |
Ok it's still broken on my build. Here's debug log
If I add a powershell task before it to do this (with access token as an env var):
It works fine. I notice the line |
can you explain to me how this templated url |
It's not real, I should have said |
another possible cause is that you don't have the proper rights defined for your package feed : |
Tried both, Checked perms on the feed too, they're all correct! I'd assume the way it automatically inserts auth stuff is lifted from this https://github.com/Microsoft/vsts-tasks/tree/master/Tasks/Npm so I'd imagine it should auth in an identical way. Npm task works fine with either I'd guess it's more likely some misconfiguration at my end, otherwise you'd have others reporting issues too? It's also strange how it happens on the 10th or so package... Perhaps that's a concurrency thing though (not sure if the requests are performed in parallel?) What I'll try when I get time, is after the |
can you show me your .npmrc so I can try to reproduce your configuration on my test env? |
Just copied and pasted from There is a new line at the bottom of the file, can't imagine that is what is throwing it off? Haven't got time to test without it at the moment, sorry. |
Ok reproduced |
Have you seen the the NpmAuthenticate Task, I'm quite tempted to remove the Authentication support from the task. Happy to hear your feedback about it. |
@sandorfr No I haven't! Would make it rather more maintainable for you if auth was done externally by MS's task. I'm happy with that. |
@Mardoxx, can you confirm that the issue is fixed for you with the latest version ? Had a feedback from vsts team and they'd prefer us to keep builtin authentication support for security reasons (because the task cleans up credentials). |
@sandorfr Works perfectly! Thanks for your support 😄 Still coming up with those resource warnings, e.g. |
This is also happening to me... was a solution even found? |
It’s long addressed and closed. If you have a problem please file a new detailed issue. |
@kdelmonte Try uninstalling and reinstalling the extensions |
I was getting the same 401 issues when trying to install from an internal packagefeed. The workaround for me, was to include a .npmrc file and use the built-in npm authenticate task. All permissions should be alright and OAuth script access is turned on. Are you sure it's working as intended? PS. also tried to reinstall the extension without luck |
As I said this has been resolved a long time ago. If you have a problem, it is probably something specific please open an issue with the proper logs. |
Great to use Yarn as a build task but unlike the npm tasks available, Yarn doesn't seem to automatically authenticate for npm registries created by the Package Management feature in TFS2017/VSTS. Is there a solution for using Package Management registries in combination with the Yarn build task?
The text was updated successfully, but these errors were encountered: