Doccano: ssh ν”„λ‘œν† μ½œμ„ μ‚¬μš©ν•˜μ—¬ Squire.git의 RHEL7μ—μ„œ npm μ„€μΉ˜κ°€ μ‹€νŒ¨ 함

에 λ§Œλ“  2020λ…„ 01μ›” 17일  Β·  3μ½”λ©˜νŠΈ  Β·  좜처: doccano/doccano

문제

μ†ŒμŠ€μ—μ„œ μ„€μΉ˜ν•˜λŠ” 경우 npm μ„€μΉ˜μ‹œ 였λ₯˜κ°€ λ°œμƒν•©λ‹ˆλ‹€.
npm μ„€μΉ˜λ‘œ 생성 된 디버그 λ‘œκ·Έλ„ μ²¨λΆ€ν–ˆμŠ΅λ‹ˆλ‹€.
λ‹€μŒ ν•΄κ²° 방법을 μ‹œλ„ν–ˆμŠ΅λ‹ˆλ‹€.
1) githubμ—μ„œ SSH pub / priv ν‚€ 쌍 생성
그런 λ‹€μŒ npmμ—μ„œ μ‹€νŒ¨ν•œ λͺ…령을 λ¬Έμ œμ—†μ΄ μˆ˜λ™μœΌλ‘œ μ‹€ν–‰ν•  수 μžˆμŠ΅λ‹ˆλ‹€.

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

2) git이 git λŒ€μ‹  httpsλ₯Ό μ‚¬μš©ν•˜λ„λ‘ κ°•μ œν•˜μ‹­μ‹œμ˜€.

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κ°€ μ•„λ‹ˆλΌ λ„€νŠΈμ›Œν¬ μ„€μ • λ•Œλ¬ΈμΈ 것 κ°™μŠ΅λ‹ˆλ‹€. λ¨Όμ € gitμ—μ„œ npm install ν•  수 μžˆλŠ”μ§€ ν™•μΈν•˜μ‹­μ‹œμ˜€.

gitμ—μ„œ npm μ„€μΉ˜λ₯Ό μ˜λ―Έν•˜λŠ” 것이 μ •ν™•νžˆ 무엇인지 λͺ…ν™•ν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€. μžμ„Ένžˆ μ„€λͺ…ν•΄ μ£Όμ‹œκ² μŠ΅λ‹ˆκΉŒ? μ–΄λ–€ λ„€νŠΈμ›Œν¬ 섀정에 λŒ€ν•΄ μ΄μ•ΌκΈ°ν•˜κ³  μžˆμŠ΅λ‹ˆκΉŒ?

λ¬Έμ œμ—†μ΄ λ‹€μŒ λͺ…령을 μ‹€ν–‰ν•  수 μžˆλ‹€κ³  μ–ΈκΈ‰ν–ˆμŠ΅λ‹ˆλ‹€.

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

κ·ΈλŸ¬λ‚˜ npm을 톡해 싀행될 λ•Œ μ‹€νŒ¨ ν•  λ•Œμž…λ‹ˆλ‹€. 이 νŠΉμ • μ €μž₯μ†Œκ°€ λ‹€λ₯Έ λ§Žμ€ μ €μž₯μ†Œμ™€ λ§ˆμ°¬κ°€μ§€λ‘œ https λŒ€μ‹  git (ssh ν”„λ‘œν† μ½œ) 링크λ₯Ό μ‚¬μš©ν•˜λŠ” 이유λ₯Ό 잘 λͺ¨λ₯΄κ² μŠ΅λ‹ˆλ‹€.

μ’‹μ•„μš”, μ§€κΈˆ μž‘λ™ν•˜λŠ” 것을 μ°Ύμ•˜μŠ΅λ‹ˆλ‹€.
λΆ„λͺ…νžˆ 이것은 npm을 sudo-ed μ„Έμ…˜μœΌλ‘œ μ‹€ν–‰ν•  λ•Œ λ°œμƒν•©λ‹ˆλ‹€.
파일 / 폴더에 λŒ€ν•œ κΆŒν•œμ„ λ³€κ²½ν•˜κ³  λŒ€μ‹  ν‘œμ€€ μ‚¬μš©μžλ‘œ μ‹€ν–‰ν•΄μ•Όν–ˆμŠ΅λ‹ˆλ‹€.

이 νŽ˜μ΄μ§€κ°€ 도움이 λ˜μ—ˆλ‚˜μš”?
0 / 5 - 0 λ“±κΈ‰