Doccano: فشل تثبيت npm على RHEL7 من Squire.git باستخدام بروتوكول ssh

تم إنشاؤها على ١٧ يناير ٢٠٢٠  ·  3تعليقات  ·  مصدر: doccano/doccano

مشكلة

للتثبيت من المصدر ، أتلقى خطأ في
لقد أرفقت أيضًا سجل التصحيح الذي تم إنشاؤه بواسطة تثبيت npm.
حاولت العمل التالي
1) قم بإنشاء زوج مفاتيح SSH pub / priv على جيثب
بعد القيام بذلك ، يمكنني تشغيل الأمر الذي فشل في npm يدويًا دون أي مشكلة

/usr/bin/git ls-remote -h -t ssh://[email protected]/seonim-ryu/Squire.git

2) حاول فرض git على استخدام https بدلاً من git

git config --global url."https://github.com/".insteadOf [email protected]:
git config --global url."https://".insteadOf git://

كيفية إعادة إنتاج المشكلة
لقد قمت بإنشاء برنامج نصي يقوم بتنفيذ ما يلي

yum install rh-python36* -y
yum install rh-nodejs12* -y
yum install gcc-c++ -y
yum groupinstall "Development tools" -y
source scl_source enable rh-nodejs12 rh-python36

git clone https://github.com/chakki-works/doccano.git
cd doccano
virtualenv venv
source venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt
cd frontend

npm install

رسالة خطأ


[root]# npm i
npm WARN deprecated [email protected]: use String.prototype.padStart()
npm WARN deprecated [email protected]: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
npm ERR! Error while executing:
npm ERR! /usr/bin/git ls-remote -h -t ssh://[email protected]/seonim-ryu/Squire.git
npm ERR!
npm ERR! fatal: failed to stat '.': Permission denied
npm ERR!
npm ERR! exited with error code: 128

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-01-17T14_05_41_472Z-debug.log

بيئتك

[root]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.7 (Maipo)

[root]# yum list installed | grep rh-python
rh-python36.x86_64             2.0-1.el7            @rhel-server-rhscl-7-rpms
[root]# python --version
Python 3.6.9

[root]# yum list installed | grep pip
rh-python36-python-pip.noarch  9.0.1-2.el7          @rhel-server-rhscl-7-rpms
[root]# pip --version
pip 9.0.1 from /opt/rh/rh-python36/root/usr/lib/python3.6/site-packages (python 3.6)

[root]# yum list installed | grep -A 2 virtualenv
rh-python36-python-virtualenv.noarch 15.1.0-2.el7         @rhel-server-rhscl-7-rpms
[root]# virtualenv --version
15.1.0

[root]# yum list installed | grep npm
rh-nodejs12-npm.x86_64         6.10.3-12.10.0.4.el7 @rhel-server-rhscl-7-rpms
[root]# npm --version
6.10.3

[root]# yum list installed | grep rh-node
rh-nodejs12.x86_64             3.4-1.el7            @rhel-server-rhscl-7-rpms
[root]# node --version
v12.10.0

[root]# yum list installed | grep git
git.x86_64                     1.8.3.1-20.el7       @rhel-7-server-rpms
[root]# git --version
git version 1.8.3.1

[root]# gcc --version
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-39)
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

هذا فشل في الآونة الأخيرة مثل عدد قليل اليوم.
2020-01-17T16_49_58_359Z-debug.log

question

التعليق الأكثر فائدة

حسنًا ، وجدت ما يعمل الآن.
يبدو أن هذا هو ما يحدث عند تشغيل npm كجلسة sudo-ed.
اضطررت إلى تغيير الأذونات على الملفات / المجلدات وتشغيلها كمستخدم قياسي بدلاً من ذلك.

ال 3 كومينتر

يبدو أن هذا الخطأ ليس بسبب doccano ولكن بسبب إعداد الشبكة. يرجى تأكيد can npm install من git بشكل صحيح في البداية.

ليس من الواضح تمامًا ما تعنيه تثبيت npm من git. هل يمكن أن تتطور؟ ما هو إعداد الشبكة الذي تتحدث عنه؟

لقد ذكرت أنه يمكنني تشغيل الأمر التالي دون أي مشكلة

/usr/bin/git ls-remote -h -t ssh://[email protected]/seonim-ryu/Squire.git

ومع ذلك ، عندما يتم تشغيله من خلال npm ، فإنه يحدث عندما يفشل. لست متأكدًا من سبب استخدام هذا المستودع المعين لروابط git (بروتوكول ssh) بدلاً من https مثل العديد من المواقع الأخرى.

حسنًا ، وجدت ما يعمل الآن.
يبدو أن هذا هو ما يحدث عند تشغيل npm كجلسة sudo-ed.
اضطررت إلى تغيير الأذونات على الملفات / المجلدات وتشغيلها كمستخدم قياسي بدلاً من ذلك.

هل كانت هذه الصفحة مفيدة؟
0 / 5 - 0 التقييمات