Topic: git https oauth2 certificate expired

innovative23 pro asked 1 year ago


Hi,

trying to install mdbreact and got below error.

npm ERR! /usr/bin/git ls-remote -h -t https://oauth2:3hkAps1EM_tSV221MP-q@git.mdbootstrap.com/mdb/react/re-pro.git npm ERR! npm ERR! fatal: unable to access 'https://oauth2:3hkAps1EM_tSV221MP-q@git.mdbootstrap.com/mdb/react/re-pro.git/': server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none

please provide any help on this issue.

Thanks


Marek Winiarski staff commented 1 year ago

Hello, The most common management is software runtime. For the sake of your deploy process, it can apply to different tools. If you have a problem when you just want to port a repo from our team, update nodeJs and Git If the deployment tool tool check the yarn files, or docker-compose, I am updating.

If you still have problems please email me: What OS and its versions, What tools of the tool when deployed (no tool, Docker, Jenkins, etc.) If a successful tool of any of the vendors (AWS, Azure, ect.) Eg AWS Boost, please send me such a message.

If you prefer m titles for the private channel, reply to mail m.winiarski@mbootstrap.com


innovative23 pro commented 1 year ago

The problem is, it is working properly before and we have not change any code since last 1 year. All of a sudden we got an error like this. We are using jenkins for deploying our code. OS :- UbuntuNode JS : 12.18.3

Below code is our simple Dockerfile which creates a docker image. here in npm install we are getting cerificate error.

FROM node:12.18.3-stretch AS build WORKDIR /src COPY ./npm-shrinkwrap.json /src/npm-shrinkwrap.json COPY ./package.json /src/package.json RUN npm install COPY ./ /src RUN npm run build

FROM nginx:1.19.10-alpine USER root COPY --from=build /src/build/ /usr/share/nginx/html/partnerportal/ RUN ls -la /usr/share/nginx/html/ EXPOSE 443


Marek Winiarski staff answered 1 year ago


I tested the container you are using and got the same error. These commands worked for me.

I followed these steps:

mv /usr/share/ca-certificates/mozilla/DST_Root_CA_X3.crt /tmp/

update-ca-certificates --fresh

git config --global http.sslCAInfo /usr/share/ca-certificates/mozilla/ISRG_Root_X1.crt

<< --- Log --- >>

root@615a639e8510:/# git clone https://oauth2:<>@git.mdbootstrap.com/mdb/react/re-pro.git/ Cloning into 're-pro'... fatal: unable to access 'https://oauth2:<>@git.mdbootstrap.com/mdb/react/re-pro.git/': server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none

root@615a639e8510:/# mv /usr/share/ca-certificates/mozilla/DST_Root_CA_X3.crt /tmp/

root@615a639e8510:/# update-ca-certificates --fresh Clearing symlinks in /etc/ssl/certs... done. Updating certificates in /etc/ssl/certs... W: /usr/share/ca-certificates/mozilla/DST_Root_CA_X3.crt not found, but listed in /etc/ca-certificates.conf. 125 added, 0 removed; done. Running hooks in /etc/ca-certificates/update.d... done.

root@615a639e8510:/# git config --global http.sslCAInfo /usr/share/ca-certificates/mozilla/ISRG_Root_X1.crt

root@615a639e8510:/# git clone https://oauth2:<>@git.mdbootstrap.com/mdb/react/re-pro.git/ Cloning into 're-pro'... remote: Enumerating objects: 26750, done. remote: Counting objects: 100% (28/28), done. remote: Compressing objects: 100% (27/27), done. remote: Total 26750 (delta 10), reused 0 (delta 0), pack-reused 26722 Receiving objects: 100% (26750/26750), 36.81 MiB | 11.47 MiB/s, done. Resolving deltas: 100% (19888/19888), done. root@615a639e8510:/#

<< --- Log --- >>


innovative23 pro commented 1 year ago

Also i am not able to install it using below command npm install git+https://oauth2:Your_token@git.mdbootstrap.com/mdb/react/re-pro.git#4.26.1 --save

I tried above thing in both windows 10 and ubuntu 18.04 but not able to install it.


Krzysztof Wilk staff commented 1 year ago

Could you try installing it using npm install git+https://oauth2:Your_token@git.mdbootstrap.com/mdb/react/re-pro.git#4.26.1 --legacy-peer-deps --save command or just yarn add git+https://oauth2:Your_token@git.mdbootstrap.com/mdb/react/re-pro.git#4.26.1? If that doesn't work - could you show the error message you got?


innovative23 pro commented 1 year ago

F:\amsys\LED-Partner-Admin>npm install git+https://oauth2:token_here@git.mdbootstrap.com/mdb/react/re-pro.git#4.26.1 --legacy-peer-deps --save npm WARN deprecated @material-ui/system@3.0.0-alpha.2: You can now upgrade to @mui/system. See the guide: https://mui.com/guides/migration-v4/ npm WARN deprecated popper.js@1.16.1: You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1 npm WARN deprecated material-ui-pickers@2.2.4: You can now upgrade to @material-ui/pickers. Documentation for v2 can be found at https://material-ui-pickers-v2.dmtr-kovalenko.now.sh/ npm WARN deprecated core-js@1.2.7: core-js@<3.4 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js. npm WARN deprecated @material-ui/core@3.9.3: You can now upgrade to @mui/material. See the guide: https://mui.com/guides/migration-v4/ npm ERR! code 1 npm ERR! git dep preparation failed npm ERR! command C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js install --force --cache=C:\Users\admin\AppData\Local\npm-cache --prefer-offline=false --prefer-online=false --offline=false --no-progress --no-save --no-audit --include=dev --include=peer --include=optional --no-package-lock-only --no-dry-run npm ERR! npm WARN using --force Recommended protections disabled. npm ERR! npm WARN old lockfile npm ERR! npm WARN old lockfile The package-lock.json file was created with an old version of npm, npm ERR! npm WARN old lockfile so supplemental metadata must be fetched from the registry. npm ERR! npm WARN old lockfile npm ERR! npm WARN old lockfile This is a one-time fix-up, please be patient... npm ERR! npm WARN old lockfile npm ERR! npm WARN deprecated ini@1.3.5: Please update to ini >=1.3.6 to avoid a prototype pollution issue npm ERR! npm WARN deprecated request-promise-native@1.0.8: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142 npm ERR! npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated npm ERR! npm WARN deprecated har-validator@5.1.3: this library is no longer supported npm ERR! npm WARN deprecated rollup-plugin-replace@2.2.0: This module has moved and is now available at @rollup/plugin-replace. Please update your dependencies. This version is no longer maintained. npm ERR! npm WARN deprecated rollup-plugin-node-resolve@5.2.0: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-node-resolve. npm ERR! npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated npm ERR! npm WARN deprecated chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies npm ERR! npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated npm ERR! npm WARN deprecated source-map-url@0.4.0: See https://github.com/lydell/source-map-url#deprecated npm ERR! npm WARN deprecated left-pad@1.3.0: use String.prototype.padStart() npm ERR! npm WARN deprecated debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797) npm ERR! npm WARN deprecated debug@3.2.6: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797) npm ERR! npm WARN deprecated debug@3.2.6: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797) npm ERR! npm WARN deprecated debug@3.2.6: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797) npm ERR! npm WARN deprecated html-webpack-plugin@3.2.0: 3.x is no longer supported npm ERR! npm WARN deprecated sane@4.1.0: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added npm ERR! npm WARN deprecated rollup-plugin-babel@4.3.3: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-babel. npm ERR! npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead. npm ERR! npm WARN deprecated babel-eslint@10.0.3: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates. npm ERR! npm WARN deprecated rollup-plugin-commonjs@10.1.0: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-commonjs. npm ERR! npm WARN deprecated request@2.88.0: request has been deprecated, see https://github.com/request/request/issues/3142 npm ERR! npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. npm ERR! npm WARN deprecated mkdirp@0.5.1: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.) npm ERR! npm WARN deprecated @material-ui/system@3.0.0-alpha.2: You can now upgrade to @mui/system. See the guide: https://mui.com/guides/migration-v4/ npm ERR! npm WARN deprecated svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x. npm ERR! npm WARN deprecated tar@2.2.2: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap. npm ERR! npm WARN deprecated popper.js@1.16.1: You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1 npm ERR! npm WARN deprecated material-ui-pickers@2.2.4: You can now upgrade to @material-ui/pickers. Documentation for v2 can be found at https://material-ui-pickers-v2.dmtr-kovalenko.now.sh/ npm ERR! npm WARN deprecated core-js@1.2.7: core-js@<3.4 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js. npm ERR! npm WARN deprecated @material-ui/core@3.9.3: You can now upgrade to @mui/material. See the guide: https://mui.com/guides/migration-v4/ npm ERR! npm ERR! code 1 npm ERR! npm ERR! path C:\Users\admin\AppData\Local\npm-cache_cacache\tmp\git-cloneVaCpkx\node_modules\node-sass npm ERR! npm ERR! command failed npm ERR! npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node scripts/build.js npm ERR! npm ERR! Building: C:\Program Files\nodejs\node.exe C:\Users\admin\AppData\Local\npm-cache_cacache\tmp\git-cloneVaCpkx\node_modules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library= npm ERR! npm ERR! gyp info it worked if it ends with ok npm ERR! npm ERR! gyp verb cli [ npm ERR! npm ERR! gyp verb cli 'C:\Program Files\nodejs\node.exe', npm ERR! npm ERR! gyp verb cli 'C:\Users\admin\AppData\Local\npm-cache\_cacache\tmp\git-cloneVaCpkx\node_modules\node-gyp\bin\node-gyp.js', npm ERR! npm ERR! gyp verb cli 'rebuild', npm ERR! npm ERR! gyp verb cli '--verbose', npm ERR! npm ERR! gyp verb cli '--libsass_ext=', npm ERR! npm ERR! gyp verb cli '--libsass_cflags=', npm ERR! npm ERR! gyp verb cli '--libsass_ldflags=', npm ERR! npm ERR! gyp verb cli '--libsass_library=' npm ERR! npm ERR! gyp verb cli ] npm ERR! npm ERR! gyp info using node-gyp@3.8.0 npm ERR! npm ERR! gyp info using node@16.14.2 | win32 | x64 npm ERR! npm ERR! gyp verb command rebuild [] npm ERR! npm ERR! gyp verb command clean [] npm ERR! npm ERR! gyp verb clean removing "build" directory npm ERR! npm ERR! gyp verb command configure [] npm ERR! npm ERR! gyp verb check python checking for Python executable "python2" in the PATH npm ERR! npm ERR! gyp verb which failed Error: not found: python2 npm ERR! npm ERR! gyp verb which failed at getNotFoundError (C:\Users\admin\AppData\Local\npm-cache_cacache\tmp\git-cloneVaCpkx\node_modules\which\which.js:13:12) npm ERR! npm ERR! gyp verb which failed at F (C:\Users\admin\AppData\Local\npm-cache_cacache\tmp\git-cloneVaCpkx\node_modules\which\which.js:68:19) npm ERR! npm ERR! gyp verb which failed at E (C:\Users\admin\AppData\Local\npm-cache_cacache\tmp\git-cloneVaCpkx\node_modules\which\which.js:80:29) npm ERR! npm ERR! gyp verb which failed at C:\Users\admin\AppData\Local\npm-cache_cacache\tmp\git-cloneVaCpkx\node_modules\which\which.js:89:16 npm ERR! npm ERR! gyp verb which failed at C:\Users\admin\AppData\Local\npm-cache_cacache\tmp\git-cloneVaCpkx\node_modules\isexe\index.js:42:5 npm ERR! npm ERR! gyp verb which failed at C:\Users\admin\AppData\Local\npm-cache_cacache\tmp\git-cloneVaCpkx\node_modules\isexe\windows.js:36:5 npm ERR! npm ERR! gyp verb which failed at FSReqCallback.oncomplete (node:fs:198:21) npm ERR! npm ERR! gyp verb which failed python2 Error: not found: python2 npm ERR! npm ERR! gyp verb which failed at getNotFoundError (C:\Users\admin\AppData\Local\npm-cache_cacache\tmp\git-cloneVaCpkx\node_modules\which\which.js:13:12) npm ERR! npm ERR! gyp verb which failed at F (C:\Users\admin\AppData\Local\npm-cache_cacache\tmp\git-cloneVaCpkx\node_modules\which\which.js:68:19) npm ERR! npm ERR! gyp verb which failed at E (C:\Users\admin\AppData\Local\npm-cache_cacache\tmp\git-cloneVaCpkx\node_modules\which\which.js:80:29) npm ERR! npm ERR! gyp verb which failed at C:\Users\admin\AppData\Local\npm-cache_cacache\tmp\git-cloneVaCpkx\node_modules\which\which.js:89:16 npm ERR! npm ERR! gyp verb which failed at C:\Users\admin\AppData\Local\npm-cache_cacache\tmp\git-cloneVaCpkx\node_modules\isexe\index.js:42:5 npm ERR! npm ERR! gyp verb which failed at C:\Users\admin\AppData\Local\npm-cache_cacache\tmp\git-cloneVaCpkx\node_modules\isexe\windows.js:36:5 npm ERR! npm ERR! gyp verb which failed at FSReqCallback.oncomplete (node:fs:198:21) { npm ERR! npm ERR! gyp verb which failed code: 'ENOENT' npm ERR! npm ERR! gyp verb which failed } npm ERR! npm ERR! gyp verb check python checking for Python executable "python" in the PATH npm ERR! npm ERR! gyp verb which succeeded python C:\Python310\python.EXE npm ERR! npm ERR! gyp ERR! configure error npm ERR! npm ERR! gyp ERR! stack Error: Command failed: C:\Python310\python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3]; npm ERR! npm ERR! gyp ERR! stack File "", line 1 npm ERR! npm ERR! gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3]; npm ERR! npm ERR! gyp ERR! stack ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ npm ERR! npm ERR! gyp ERR! stack SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)? npm ERR! npm ERR! gyp ERR! stack npm ERR! npm ERR! gyp ERR! stack at ChildProcess.exithandler (node:child_process:399:12) npm ERR! npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:526:28) npm ERR! npm ERR! gyp ERR! stack at maybeClose (node:internal/child_process:1092:16) npm ERR! npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5) npm ERR! npm ERR! gyp ERR! System Windows_NT 10.0.19044 npm ERR! npm ERR! gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\admin\AppData\Local\npm-cache\_cacache\tmp\git-cloneVaCpkx\node_modules\node-gyp\bin\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library=" npm ERR! npm ERR! gyp ERR! cwd C:\Users\admin\AppData\Local\npm-cache_cacache\tmp\git-cloneVaCpkx\node_modules\node-sass npm ERR! npm ERR! gyp ERR! node -v v16.14.2 npm ERR! npm ERR! gyp ERR! node-gyp -v v3.8.0 npm ERR! npm ERR! gyp ERR! not ok npm ERR! npm ERR! Build failed with error code: 1 npm ERR! npm ERR! npm ERR! A complete log of this run can be found in: npm ERR! npm ERR! C:\Users\admin\AppData\Local\npm-cache_logs\2022-06-08T07_01_42_208Z-debug-0.log

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\admin\AppData\Local\npm-cache_logs\2022-06-08T07_00_30_221Z-debug-0.log

F:\amsys\LED-Partner-Admin>


innovative23 pro commented 1 year ago

However yarn add is working fine. Issue is only in npm install


Krzysztof Wilk staff commented 1 year ago

Okay, we'll check that as soon as possible :)


innovative23 pro commented 1 year ago

Thanks for checking and please let me know on this.


innovative23 pro commented 1 year ago

Any update on this ?


Krzysztof Wilk staff commented 1 year ago

Hi!

I'm afraid there's no update.



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Pro
  • Premium support: No
  • Technology: MDB React
  • MDB Version: MDB4 4.26.1
  • Device: Laptop
  • Browser: Chrome
  • OS: ubuntu
  • Provided sample code: No
  • Provided link: Yes