Closed Venipa closed 2 years ago
so i've found the "fix", the customFeed is saved as an ID but the feed im using in the yarn.lock contains the name of the feed. Thats why it returns 401 because this addon/plugin generates auth for the feed id
I’ll have a look, but I’ve never had such issues.
However I’d strongly recommend you commit an .npmrc it’s way more stable. Plus it makes things easier for people checking you repo out ;).
On Thu 5 Sep 2019 at 10:55, Venipa notifications@github.com wrote:
so i've found the "fix", the customFeed is saved as an ID but the feed im using in the yarn.lock contains the name of the feed. Thats why it returns 401 because this addon/plugin generates auth for the feed id
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/geeklearningio/gl-vsts-tasks-yarn/issues/71?email_source=notifications&email_token=AAUJPJR2CYAS5Y3BYDBWEZDQIDCRJA5CNFSM4IT2YAI2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD56L4PQ#issuecomment-528268862, or mute the thread https://github.com/notifications/unsubscribe-auth/AAUJPJRM55VXUL5D4NCTYQTQIDCRJANCNFSM4IT2YAIQ .
@Venipa How did you work around this?
I'm having the exact same issue. I tried changing the id to match the URL, however I'm still getting a 401 in the build pipeline (presumably because it needs the ID to authenticate?).
@nixstrom the solution is to remove the yarn.lock and afterwards it will work, the url you're working with is probably different from the .npmrc
Thanks for the very quick response.
That unfortunately did not work - and regardless, the URL in yarn.lock
is the same as in .npmrc
. However, it's different in azure-pipelines.yml
, since that one grabs a guid.
.npmrc
registry=https://pkgs.dev.azure.com/[redacted]/_packaging/yarn_registry/npm/registry/
always-auth=true
azure-pipelines.yml:
- task: Yarn@3
displayName: 'Install Node pacakges'
inputs:
projectDirectory: 'src'
arguments: '--prefer-offline'
customRegistry: 'useFeed'
customFeed: '00000-0000-000... [redacted guid]'
Example from yarn.lock:
"@ant-design/colors@^3.1.0":
version "3.2.2"
resolved "https://pkgs.dev.azure.com/[redacted]/_packaging/yarn_registry/npm/registry/@ant-design/colors/-/colors-3.2.2.tgz#5ad43d619e911f3488ebac303d606e66a8423903"
integrity sha1-WtQ9YZ6RHzSI66wwPWBuZqhCOQM=
dependencies:
tinycolor2 "^1.4.1"
Does anything fishy spring to mind in my setup?
im using the UI so i cant really tell if you're missing something
url looks fine tho
Looks like you misconfigured this :
customRegistry: 'useFeed'
It should be useNpmrc
On Mon 30 Sep 2019 at 19:41, Venipa notifications@github.com wrote:
im using the UI so i cant really tell if you're missing something
url looks fine tho
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/geeklearningio/gl-vsts-tasks-yarn/issues/71?email_source=notifications&email_token=AAUJPJXMTGEXQLS3T7HCZ73QMHCVXA5CNFSM4IT2YAI2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD75CBNA#issuecomment-536486068, or mute the thread https://github.com/notifications/unsubscribe-auth/AAUJPJWWMKNU35XKKNHNCMTQMHCVXANCNFSM4IT2YAIQ .
Is this missing in the documentation, or am I looking at the wrong place? Unfortunately, that still produces a 401 in the build pipeline. Do I need to manually add an authentication step?
I imagined, that when I pointed it to a custom feed (in the UI), it would self-authenticate ...
Your comment was showing an npmrc payload...
Is it committed to your repo?
On Mon 30 Sep 2019 at 20:06, Nikki Strømsnes notifications@github.com wrote:
Is this missing in the documentation, or am I looking at the wrong place? Unfortunately, that still produces a 401 in the build pipeline. Do I need to manually add an authentication step?
I imagined, that when I pointed it to a custom feed (in the UI), it would self-authenticate ...
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/geeklearningio/gl-vsts-tasks-yarn/issues/71?email_source=notifications&email_token=AAUJPJUPXNSAHPEMJE4LWG3QMHFQPA5CNFSM4IT2YAI2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD75EGLI#issuecomment-536494893, or mute the thread https://github.com/notifications/unsubscribe-auth/AAUJPJXIAL7JOI37LRJRA43QMHFQPANCNFSM4IT2YAIQ .
.npmrc
is committed, yes. As in the OP, it works locally, but fails once it reaches the pipeline.
I also tried deleting .npmrc
, and using useFeed
pointed to the feed, without success.
If it's simpler to setup, I wouldn't mind too much that it doesn't work locally, but for the pipeline we would prefer to use our custom registry in Azure.
EDIT: In the log, I don't see any authentication step at all. Shouldn't I expect to see that, or ...?
EDIT: In the log, I don't see any authentication step at all. Shouldn't I expect to see that, or ...? No authentication is handle by the task itself
I just tried with a feed configure as suggested by the package feed and it works just fine:
Yaml Build
steps:
- task: geeklearningio.gl-vsts-tasks-yarn-dev.yarn-task.Yarn@3
displayName: 'Custom Package in Custom Feed npmrc copy'
inputs:
projectDirectory: src/YarnCustomPackageNpmRcWithLockfile
condition: succeededOrFailed()
.nmprc
registry=https://pkgs.dev.azure.com/{account}/_packaging/{feed-name}/npm/registry/
always-auth=true
package.jsn
{
"name": "sample",
"version": "1.0.0",
"private": true,
"devDependencies": {
},
"scripts": {
},
"dependencies": {
"fs-extra": "0.30.0",
"micromatch": "2.3.11",
"semver": "5.3.0",
"vsts-task-lib": "0.9.6",
"sample-custom-package": "1.0.0"
}
}
yarn.lock
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
arr-diff@^2.0.0:
version "2.0.0"
resolved "https://pkgs.dev.azure.com/{account}/_packaging/{feed-name}/npm/registry/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf"
integrity sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=
dependencies:
arr-flatten "^1.0.1"
arr-flatten@^1.0.1:
version "1.1.0"
resolved "https://pkgs.dev.azure.com/{account}/_packaging/{feed-name}/npm/registry/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1"
integrity sha1-NgSLv/TntH4TZkQxbJlmnqWukfE=
array-unique@^0.2.1:
version "0.2.1"
resolved "https://pkgs.dev.azure.com/{account}/_packaging/{feed-name}/npm/registry/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53"
integrity sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=
balanced-match@^1.0.0:
version "1.0.0"
resolved "https://pkgs.dev.azure.com/{account}/_packaging/{feed-name}/npm/registry/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c=
brace-expansion@^1.1.7:
version "1.1.11"
resolved "https://pkgs.dev.azure.com/{account}/_packaging/{feed-name}/npm/registry/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
integrity sha1-PH/L9SnYcibz0vUrlm/1Jx60Qd0=
dependencies:
balanced-match "^1.0.0"
concat-map "0.0.1"
braces@^1.8.2:
version "1.8.5"
resolved "https://pkgs.dev.azure.com/{account}/_packaging/{feed-name}/npm/registry/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7"
integrity sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=
dependencies:
expand-range "^1.8.1"
preserve "^0.2.0"
repeat-element "^1.1.2"
concat-map@0.0.1:
version "0.0.1"
resolved "https://pkgs.dev.azure.com/{account}/_packaging/{feed-name}/npm/registry/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=
expand-brackets@^0.1.4:
version "0.1.5"
resolved "https://pkgs.dev.azure.com/{account}/_packaging/{feed-name}/npm/registry/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b"
integrity sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=
dependencies:
is-posix-bracket "^0.1.0"
expand-range@^1.8.1:
version "1.8.2"
resolved "https://pkgs.dev.azure.com/{account}/_packaging/{feed-name}/npm/registry/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337"
integrity sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=
dependencies:
fill-range "^2.1.0"
extglob@^0.3.1:
version "0.3.2"
resolved "https://pkgs.dev.azure.com/{account}/_packaging/{feed-name}/npm/registry/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1"
integrity sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=
dependencies:
is-extglob "^1.0.0"
filename-regex@^2.0.0:
version "2.0.1"
resolved "https://pkgs.dev.azure.com/{account}/_packaging/{feed-name}/npm/registry/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26"
integrity sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=
fill-range@^2.1.0:
version "2.2.4"
resolved "https://pkgs.dev.azure.com/{account}/_packaging/{feed-name}/npm/registry/fill-range/-/fill-range-2.2.4.tgz#eb1e773abb056dcd8df2bfdf6af59b8b3a936565"
integrity sha1-6x53OrsFbc2N8r/favWbizqTZWU=
dependencies:
is-number "^2.1.0"
isobject "^2.0.0"
randomatic "^3.0.0"
repeat-element "^1.1.2"
repeat-string "^1.5.2"
for-in@^1.0.1:
version "1.0.2"
resolved "https://pkgs.dev.azure.com/{account}/_packaging/{feed-name}/npm/registry/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80"
integrity sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=
for-own@^0.1.4:
version "0.1.5"
resolved "https://pkgs.dev.azure.com/{account}/_packaging/{feed-name}/npm/registry/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce"
integrity sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=
dependencies:
for-in "^1.0.1"
fs-extra@0.30.0:
version "0.30.0"
resolved "https://pkgs.dev.azure.com/{account}/_packaging/{feed-name}/npm/registry/fs-extra/-/fs-extra-0.30.0.tgz#f233ffcc08d4da7d432daa449776989db1df93f0"
integrity sha1-8jP/zAjU2n1DLapEl3aYnbHfk/A=
dependencies:
graceful-fs "^4.1.2"
jsonfile "^2.1.0"
klaw "^1.0.0"
path-is-absolute "^1.0.0"
rimraf "^2.2.8"
fs.realpath@^1.0.0:
version "1.0.0"
resolved "https://pkgs.dev.azure.com/{account}/_packaging/{feed-name}/npm/registry/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8=
glob-base@^0.3.0:
version "0.3.0"
resolved "https://pkgs.dev.azure.com/{account}/_packaging/{feed-name}/npm/registry/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4"
integrity sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=
dependencies:
glob-parent "^2.0.0"
is-glob "^2.0.0"
glob-parent@^2.0.0:
version "2.0.0"
resolved "https://pkgs.dev.azure.com/{account}/_packaging/{feed-name}/npm/registry/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28"
integrity sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=
dependencies:
is-glob "^2.0.0"
glob@^6.0.1:
version "6.0.4"
resolved "https://pkgs.dev.azure.com/{account}/_packaging/{feed-name}/npm/registry/glob/-/glob-6.0.4.tgz#0f08860f6a155127b2fadd4f9ce24b1aab6e4d22"
integrity sha1-DwiGD2oVUSey+t1PnOJLGqtuTSI=
dependencies:
inflight "^1.0.4"
inherits "2"
minimatch "2 || 3"
once "^1.3.0"
path-is-absolute "^1.0.0"
glob@^7.1.3:
version "7.1.4"
resolved "https://pkgs.dev.azure.com/{account}/_packaging/{feed-name}/npm/registry/glob/-/glob-7.1.4.tgz#aa608a2f6c577ad357e1ae5a5c26d9a8d1969255"
integrity sha1-qmCKL2xXetNX4a5aXCbZqNGWklU=
dependencies:
fs.realpath "^1.0.0"
inflight "^1.0.4"
inherits "2"
minimatch "^3.0.4"
once "^1.3.0"
path-is-absolute "^1.0.0"
graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9:
version "4.2.2"
resolved "https://pkgs.dev.azure.com/{account}/_packaging/{feed-name}/npm/registry/graceful-fs/-/graceful-fs-4.2.2.tgz#6f0952605d0140c1cfdb138ed005775b92d67b02"
integrity sha1-bwlSYF0BQMHP2xOO0AV3W5LWewI=
inflight@^1.0.4:
version "1.0.6"
resolved "https://pkgs.dev.azure.com/{account}/_packaging/{feed-name}/npm/registry/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=
dependencies:
once "^1.3.0"
wrappy "1"
inherits@2:
version "2.0.4"
resolved "https://pkgs.dev.azure.com/{account}/_packaging/{feed-name}/npm/registry/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
integrity sha1-D6LGT5MpF8NDOg3tVTY6rjdBa3w=
is-buffer@^1.1.5:
version "1.1.6"
resolved "https://pkgs.dev.azure.com/{account}/_packaging/{feed-name}/npm/registry/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be"
integrity sha1-76ouqdqg16suoTqXsritUf776L4=
is-dotfile@^1.0.0:
version "1.0.3"
resolved "https://pkgs.dev.azure.com/{account}/_packaging/{feed-name}/npm/registry/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1"
integrity sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=
is-equal-shallow@^0.1.3:
version "0.1.3"
resolved "https://pkgs.dev.azure.com/{account}/_packaging/{feed-name}/npm/registry/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534"
integrity sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=
dependencies:
is-primitive "^2.0.0"
is-extendable@^0.1.1:
version "0.1.1"
resolved "https://pkgs.dev.azure.com/{account}/_packaging/{feed-name}/npm/registry/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89"
integrity sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=
is-extglob@^1.0.0:
version "1.0.0"
resolved "https://pkgs.dev.azure.com/{account}/_packaging/{feed-name}/npm/registry/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0"
integrity sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=
is-glob@^2.0.0, is-glob@^2.0.1:
version "2.0.1"
resolved "https://pkgs.dev.azure.com/{account}/_packaging/{feed-name}/npm/registry/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863"
integrity sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=
dependencies:
is-extglob "^1.0.0"
is-number@^2.1.0:
version "2.1.0"
resolved "https://pkgs.dev.azure.com/{account}/_packaging/{feed-name}/npm/registry/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f"
integrity sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=
dependencies:
kind-of "^3.0.2"
is-number@^4.0.0:
version "4.0.0"
resolved "https://pkgs.dev.azure.com/{account}/_packaging/{feed-name}/npm/registry/is-number/-/is-number-4.0.0.tgz#0026e37f5454d73e356dfe6564699867c6a7f0ff"
integrity sha1-ACbjf1RU1z41bf5lZGmYZ8an8P8=
is-posix-bracket@^0.1.0:
version "0.1.1"
resolved "https://pkgs.dev.azure.com/{account}/_packaging/{feed-name}/npm/registry/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4"
integrity sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=
is-primitive@^2.0.0:
version "2.0.0"
resolved "https://pkgs.dev.azure.com/{account}/_packaging/{feed-name}/npm/registry/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575"
integrity sha1-IHurkWOEmcB7Kt8kCkGochADRXU=
isarray@1.0.0:
version "1.0.0"
resolved "https://pkgs.dev.azure.com/{account}/_packaging/{feed-name}/npm/registry/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11"
integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=
isobject@^2.0.0:
version "2.1.0"
resolved "https://pkgs.dev.azure.com/{account}/_packaging/{feed-name}/npm/registry/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89"
integrity sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=
dependencies:
isarray "1.0.0"
jsonfile@^2.1.0:
version "2.4.0"
resolved "https://pkgs.dev.azure.com/{account}/_packaging/{feed-name}/npm/registry/jsonfile/-/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8"
integrity sha1-NzaitCi4e72gzIO1P6PWM6NcKug=
optionalDependencies:
graceful-fs "^4.1.6"
kind-of@^3.0.2:
version "3.2.2"
resolved "https://pkgs.dev.azure.com/{account}/_packaging/{feed-name}/npm/registry/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64"
integrity sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=
dependencies:
is-buffer "^1.1.5"
kind-of@^6.0.0:
version "6.0.2"
resolved "https://pkgs.dev.azure.com/{account}/_packaging/{feed-name}/npm/registry/kind-of/-/kind-of-6.0.2.tgz#01146b36a6218e64e58f3a8d66de5d7fc6f6d051"
integrity sha1-ARRrNqYhjmTljzqNZt5df8b20FE=
klaw@^1.0.0:
version "1.3.1"
resolved "https://pkgs.dev.azure.com/{account}/_packaging/{feed-name}/npm/registry/klaw/-/klaw-1.3.1.tgz#4088433b46b3b1ba259d78785d8e96f73ba02439"
integrity sha1-QIhDO0azsbolnXh4XY6W9zugJDk=
optionalDependencies:
graceful-fs "^4.1.9"
math-random@^1.0.1:
version "1.0.4"
resolved "https://pkgs.dev.azure.com/{account}/_packaging/{feed-name}/npm/registry/math-random/-/math-random-1.0.4.tgz#5dd6943c938548267016d4e34f057583080c514c"
integrity sha1-XdaUPJOFSCZwFtTjTwV1gwgMUUw=
micromatch@2.3.11:
version "2.3.11"
resolved "https://pkgs.dev.azure.com/{account}/_packaging/{feed-name}/npm/registry/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565"
integrity sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=
dependencies:
arr-diff "^2.0.0"
array-unique "^0.2.1"
braces "^1.8.2"
expand-brackets "^0.1.4"
extglob "^0.3.1"
filename-regex "^2.0.0"
is-extglob "^1.0.0"
is-glob "^2.0.1"
kind-of "^3.0.2"
normalize-path "^2.0.1"
object.omit "^2.0.0"
parse-glob "^3.0.4"
regex-cache "^0.4.2"
"minimatch@2 || 3", minimatch@^3.0.0, minimatch@^3.0.4:
version "3.0.4"
resolved "https://pkgs.dev.azure.com/{account}/_packaging/{feed-name}/npm/registry/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
integrity sha1-UWbihkV/AzBgZL5Ul+jbsMPTIIM=
dependencies:
brace-expansion "^1.1.7"
node-uuid@^1.4.7:
version "1.4.8"
resolved "https://pkgs.dev.azure.com/{account}/_packaging/{feed-name}/npm/registry/node-uuid/-/node-uuid-1.4.8.tgz#b040eb0923968afabf8d32fb1f17f1167fdab907"
integrity sha1-sEDrCSOWivq/jTL7HxfxFn/auQc=
normalize-path@^2.0.1:
version "2.1.1"
resolved "https://pkgs.dev.azure.com/{account}/_packaging/{feed-name}/npm/registry/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9"
integrity sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=
dependencies:
remove-trailing-separator "^1.0.1"
object.omit@^2.0.0:
version "2.0.1"
resolved "https://pkgs.dev.azure.com/{account}/_packaging/{feed-name}/npm/registry/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa"
integrity sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=
dependencies:
for-own "^0.1.4"
is-extendable "^0.1.1"
once@^1.3.0:
version "1.4.0"
resolved "https://pkgs.dev.azure.com/{account}/_packaging/{feed-name}/npm/registry/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E=
dependencies:
wrappy "1"
parse-glob@^3.0.4:
version "3.0.4"
resolved "https://pkgs.dev.azure.com/{account}/_packaging/{feed-name}/npm/registry/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c"
integrity sha1-ssN2z7EfNVE7rdFz7wu246OIORw=
dependencies:
glob-base "^0.3.0"
is-dotfile "^1.0.0"
is-extglob "^1.0.0"
is-glob "^2.0.0"
path-is-absolute@^1.0.0:
version "1.0.1"
resolved "https://pkgs.dev.azure.com/{account}/_packaging/{feed-name}/npm/registry/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18=
preserve@^0.2.0:
version "0.2.0"
resolved "https://pkgs.dev.azure.com/{account}/_packaging/{feed-name}/npm/registry/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"
integrity sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=
q@^1.0.1, q@^1.1.2:
version "1.5.1"
resolved "https://pkgs.dev.azure.com/{account}/_packaging/{feed-name}/npm/registry/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7"
integrity sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=
randomatic@^3.0.0:
version "3.1.1"
resolved "https://pkgs.dev.azure.com/{account}/_packaging/{feed-name}/npm/registry/randomatic/-/randomatic-3.1.1.tgz#b776efc59375984e36c537b2f51a1f0aff0da1ed"
integrity sha1-t3bvxZN1mE42xTey9RofCv8Noe0=
dependencies:
is-number "^4.0.0"
kind-of "^6.0.0"
math-random "^1.0.1"
regex-cache@^0.4.2:
version "0.4.4"
resolved "https://pkgs.dev.azure.com/{account}/_packaging/{feed-name}/npm/registry/regex-cache/-/regex-cache-0.4.4.tgz#75bdc58a2a1496cec48a12835bc54c8d562336dd"
integrity sha1-db3FiioUls7EihKDW8VMjVYjNt0=
dependencies:
is-equal-shallow "^0.1.3"
remove-trailing-separator@^1.0.1:
version "1.1.0"
resolved "https://pkgs.dev.azure.com/{account}/_packaging/{feed-name}/npm/registry/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef"
integrity sha1-wkvOKig62tW8P1jg1IJJuSN52O8=
repeat-element@^1.1.2:
version "1.1.3"
resolved "https://pkgs.dev.azure.com/{account}/_packaging/{feed-name}/npm/registry/repeat-element/-/repeat-element-1.1.3.tgz#782e0d825c0c5a3bb39731f84efee6b742e6b1ce"
integrity sha1-eC4NglwMWjuzlzH4Tv7mt0Lmsc4=
repeat-string@^1.5.2:
version "1.6.1"
resolved "https://pkgs.dev.azure.com/{account}/_packaging/{feed-name}/npm/registry/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637"
integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc=
rimraf@^2.2.8:
version "2.7.1"
resolved "https://pkgs.dev.azure.com/{account}/_packaging/{feed-name}/npm/registry/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec"
integrity sha1-NXl/E6f9rcVmFCwp1PB8ytSD4+w=
dependencies:
glob "^7.1.3"
sample-custom-package@1.0.0:
version "1.0.0"
resolved "https://pkgs.dev.azure.com/{account}/_packaging/{feed-name}/npm/registry/sample-custom-package/-/sample-custom-package-1.0.0.tgz#2f3877e32a02ca5c4915ef77a8fdd67068c83337"
integrity sha1-Lzh34yoCylxJFe93qP3WcGjIMzc=
semver@5.3.0:
version "5.3.0"
resolved "https://pkgs.dev.azure.com/{account}/_packaging/{feed-name}/npm/registry/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f"
integrity sha1-myzl094C0XxgEq0yaqa00M9U+U8=
semver@^5.1.0:
version "5.7.1"
resolved "https://pkgs.dev.azure.com/{account}/_packaging/{feed-name}/npm/registry/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7"
integrity sha1-qVT5Ma66UI0we78Gnv8MAclhFvc=
shelljs@^0.3.0:
version "0.3.0"
resolved "https://pkgs.dev.azure.com/{account}/_packaging/{feed-name}/npm/registry/shelljs/-/shelljs-0.3.0.tgz#3596e6307a781544f591f37da618360f31db57b1"
integrity sha1-NZbmMHp4FUT1kfN9phg2DzHbV7E=
vso-node-api@^0.6.1:
version "0.6.1"
resolved "https://pkgs.dev.azure.com/{account}/_packaging/{feed-name}/npm/registry/vso-node-api/-/vso-node-api-0.6.1.tgz#9d3dd06a8dae2ff3682af8f28a845739a0bd6481"
integrity sha1-nT3Qao2uL/NoKvjyioRXOaC9ZIE=
dependencies:
q "^1.0.1"
vsts-task-lib@0.9.6:
version "0.9.6"
resolved "https://pkgs.dev.azure.com/{account}/_packaging/{feed-name}/npm/registry/vsts-task-lib/-/vsts-task-lib-0.9.6.tgz#c64e534ea5d52c818d5346914fb4d78a7a777b58"
integrity sha1-xk5TTqXVLIGNU0aRT7TXinp3e1g=
dependencies:
glob "^6.0.1"
minimatch "^3.0.0"
node-uuid "^1.4.7"
q "^1.1.2"
semver "^5.1.0"
shelljs "^0.3.0"
vso-node-api "^0.6.1"
wrappy@1:
version "1.0.2"
resolved "https://pkgs.dev.azure.com/{account}/_packaging/{feed-name}/npm/registry/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=
Thanks for helping me debug.
It seems I made it work eventually, by adding a separate authentication step (using npm Authenticate).
It's odd that yours work without adding this extra step, as it seems to me that our setups are otherwise the same. ¯_(ツ)_/¯
It seems I made it work eventually, by adding a separate authentication step (using npm Authenticate).
That's redundant, but if it unblocks you :)
as it seems to me that our setups are otherwise the same. ¯(ツ)/¯
There must be a difference somewhere.
an alternate solution is to build your .npmrc and its own credentials which is placed in the project dir in runtime
That’s exactly what the task does
I'm currently struggling to get a build pipeline to yarn install using the task.
Assuming the difference in url is the issue, there seems to be a mismatch between the Azure Artifacts guidance and the build task.
The "Connect to feed" dialog in Azure Artifacts states to put the following in .npmrc:
registry=https://[redacted].pkgs.visualstudio.com/_packaging/[redacted]/npm/registry/
always-auth=true
All entries in the lockfile resolve to this.
Yet the Yarn task generates the following .npmrc:
info npm config
{ registry:
'https://pkgs.dev.azure.com/[redacted]/_packaging/[redacted]/npm/registry/',
'always-auth':
true,
'//pkgs.dev.azure.com/[redacted]/_packaging/[redacted]/npm/registry/:_authToken':
'***',
cache:
'C:\\npm\\cache',
prefix:
'C:\\npm\\prefix' }
The GET requests are going to the resolved url in the lockfile and resulting in 401s.
Switching out the Yarn task for the npm task, it works with the same arrangement.
Your npmrc is using a deprecated visualstudio.com url while your lockfile contains proper modernized dev.azure.com url.
Out of curiosity have you not migrated your instance to the new url format yet?
On Mon 21 Oct 2019 at 20:16, Brett Postin notifications@github.com wrote:
I'm currently struggling to get a build pipeline to yarn install using the task.
Assuming the difference in url is the issue, there seems to be a mismatch between the Azure Artifacts guidance and the build task.
The "Connect to feed" dialog in Azure Artifacts states to put the following in .npmrc:
registry=https://[redacted].pkgs.visualstudio.com/_packaging/[redacted]/npm/registry/ always-auth=true http://pkgs.visualstudio.com/_packaging/%5Bredacted%5D/npm/registry/always-auth=true
All entries in the lockfile resolve to this.
Yet the Yarn task generates the following .npmrc:
info npm config { registry: 'https://pkgs.dev.azure.com/[redacted]/_packaging/[redacted]/npm/registry/', 'always-auth': true, '//pkgs.dev.azure.com/[redacted]/_packaging/[redacted]/npm/registry/:_authToken http://pkgs.dev.azure.com/%5Bredacted%5D/_packaging/%5Bredacted%5D/npm/registry/:_authToken': '***', cache: 'C:\npm\cache', prefix: 'C:\npm\prefix' }
The GET requests are going to the resolved url in the lockfile and resulting in 401s.
Switching out the Yarn task for the npm task, it works with the same arrangement.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/geeklearningio/gl-vsts-tasks-yarn/issues/71?email_source=notifications&email_token=AAUJPJQGPZMGWPE2PO7NR23QPVXPXA5CNFSM4IT2YAI2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBZUQWY#issuecomment-544426075, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAUJPJXXIKPXJ5TLW7J4GNTQPVXPXANCNFSM4IT2YAIQ .
This is the guidance in Azure Artifacts UI. Is there something to do to migrate? I created the feed only last week?
Also, the "generate npm credentials" link in the frontend used by developers to store their own tokens generates the token with the visualstudio.com url.
Whilst I'll try and see if changing the url works, it's going to cause a lot of confusion for devs getting up and running.
I think if you set your npmrc to the same url as your lockfile you’ll be fine.
I don’t know why the guidance is not up to date.. probably a bug.
You can also make the switch to the new url for your organization. It’s a switch in the overview section of your organization settings (be careful it’s one way ;))
https://docs.microsoft.com/en-us/azure/devops/release-notes/2018/sep-10-azure-devops-launch
Turns out we already have that enabled, my bookmarks are just out of date!
Accessing via the azure url changes the provided guidance to match the new url format.
Thanks!
That’s a pretty nasty bug
I was having this issue with the auto generate task step that would populate the customFeed step with the GUID of the registry.
When I replaced the GUID with the name of the registry everything started working as expected.
I was having this issue with the auto generate task step that would populate the customFeed step with the GUID of the registry.
When I replaced the GUID with the name of the registry everything started working as expected. This worked for me, thanks @narthollis
Thanks for all the hints here. For me it was two things:
I am still using an ID for customFeed, so that didn't seem to matter for me.
Are you reporting a bug or a feature request ?
Description
yarn install returns 401 unauthorized, i thought it was an url issue but it turned out it wasnt
Expected behavior
200 successfull installation
Reproduction
In order to allow us to quickly reproduce you issue please include a link to a reproduction repository
System information
VSTS or TFS:
Agent:
OS:
Yarn version: uses latest if available
Node version: 11.x