https://github.com/mobz/elasticsearch-head#running-with-built-in-server独立的服务启动

https://github.com/mobz/elasticsearch-head#running-with-built-in-serverhttps://github.com/mobz/elasticsearch-head#running-with-built-in-serverhttp://blog.youkuaiyun.com/onlylove_longshao/article/details/72765696








[wangshumin@CentOSNode1 bin]$ yum search  npm 

已加载插件:fastestmirror, langpacks
Determining fastest mirrors
 * base: mirrors.cn99.com
 * extras: mirrors.cn99.com
 * updates: mirrors.zju.edu.cn
========================================================================================= 匹配:npm =========================================================================================
python-kdcproxy.noarch : MS-KKDCP (kerberos proxy) WSGI module
[wangshumin@CentOSNode1 bin]$ yum install python-kdcproxy.noarch
已加载插件:fastestmirror, langpacks
您需要 root 权限执行此命令。
[wangshumin@CentOSNode1 bin]$ sudo yum install python-kdcproxy.noarch
[sudo] wangshumin 的密码:
已加载插件:fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirror.bit.edu.cn
 * extras: mirror.bit.edu.cn
 * updates: mirrors.neusoft.edu.cn
正在解决依赖关系
--> 正在检查事务
---> 软件包 python-kdcproxy.noarch.0.0.3.2-1.el7 将被 安装
--> 解决依赖关系完成


依赖关系解决


=============================================================================================================================================================================================
 Package                                            架构                                      版本                                             源                                       大小
=============================================================================================================================================================================================
正在安装:
 python-kdcproxy                                    noarch                                    0.3.2-1.el7                                      base                                     27 k


事务概要
=============================================================================================================================================================================================
安装  1 软件包


总下载量:27 k
安装大小:94 k
Is this ok [y/d/N]: y
Downloading packages:
python-kdcproxy-0.3.2-1.el7.noarch.rpm                                                                                                                                |  27 kB  00:00:03     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  正在安装    : python-kdcproxy-0.3.2-1.el7.noarch                                                                                                                                       1/1 
  验证中      : python-kdcproxy-0.3.2-1.el7.noarch                                                                                                                                       1/1 


已安装:
  python-kdcproxy.noarch 0:0.3.2-1.el7                                                                                                                                                       


完毕!
[wangshumin@CentOSNode1 bin]$ yum search  npm 
已加载插件:fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirrors.cn99.com
 * extras: mirrors.cn99.com
 * updates: mirrors.zju.edu.cn
========================================================================================= 匹配:npm =========================================================================================
python-kdcproxy.noarch : MS-KKDCP (kerberos proxy) WSGI module
[wangshumin@CentOSNode1 bin]$ ll
总用量 24312
-rwxrwxr-x. 1 wangshumin wangshumin 24888558 6月  29 2016 node
lrwxrwxrwx. 1 wangshumin wangshumin       38 6月  29 2016 npm -> ../lib/node_modules/npm/bin/npm-cli.js
-rw-rw-r--. 1 wangshumin wangshumin     2729 1月  28 23:23 npm-debug.log
[wangshumin@CentOSNode1 bin]$ npm install -g grunt-cli
/home/wangshumin/ekl/node-v4.4.7-linux-x64/bin/grunt -> /home/wangshumin/ekl/node-v4.4.7-linux-x64/lib/node_modules/grunt-cli/bin/grunt
grunt-cli@1.2.0 /home/wangshumin/ekl/node-v4.4.7-linux-x64/lib/node_modules/grunt-cli
├── grunt-known-options@1.1.0
├── nopt@3.0.6 (abbrev@1.1.1)
├── resolve@1.1.7
└── findup-sync@0.3.0 (glob@5.0.15)
[wangshumin@CentOSNode1 bin]$  npm install grunt --save-dev 
npm ERR! not a package /home/wangshumin/ekl/node-v4.4.7-linux-x64/bin/grunt
npm ERR! addLocal Could not install /home/wangshumin/ekl/node-v4.4.7-linux-x64/bin/grunt
npm ERR! Linux 3.10.0-693.el7.x86_64
npm ERR! argv "/home/wangshumin/ekl/node-v4.4.7-linux-x64/bin/node" "/home/wangshumin/ekl/node-v4.4.7-linux-x64/bin/npm" "install" "grunt" "--save-dev"
npm ERR! node v4.4.7
npm ERR! npm  v2.15.8
npm ERR! path /tmp/npm-5368-dc5a1391/unpack-01d8ebec38e9/package.json
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall open


npm ERR! enoent ENOENT: no such file or directory, open '/tmp/npm-5368-dc5a1391/unpack-01d8ebec38e9/package.json'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent 


npm ERR! Please include the following file with any support request:
npm ERR!     /home/wangshumin/ekl/node-v4.4.7-linux-x64/bin/npm-debug.log
[wangshumin@CentOSNode1 bin]$ grunt -version
grunt-cli v1.2.0
[wangshumin@CentOSNode1 bin]$ npm install grunt --save-dev
npm ERR! not a package /home/wangshumin/ekl/node-v4.4.7-linux-x64/bin/grunt
npm ERR! addLocal Could not install /home/wangshumin/ekl/node-v4.4.7-linux-x64/bin/grunt
npm ERR! Linux 3.10.0-693.el7.x86_64
npm ERR! argv "/home/wangshumin/ekl/node-v4.4.7-linux-x64/bin/node" "/home/wangshumin/ekl/node-v4.4.7-linux-x64/bin/npm" "install" "grunt" "--save-dev"
npm ERR! node v4.4.7
npm ERR! npm  v2.15.8
npm ERR! path /tmp/npm-5393-80bb7d4a/unpack-dbfe874fac2d/package.json
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall open


npm ERR! enoent ENOENT: no such file or directory, open '/tmp/npm-5393-80bb7d4a/unpack-dbfe874fac2d/package.json'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent 


npm ERR! Please include the following file with any support request:
npm ERR!     /home/wangshumin/ekl/node-v4.4.7-linux-x64/bin/npm-debug.log
[wangshumin@CentOSNode1 bin]$ git clone git://github.com/mobz/elasticsearch-head.git
正克隆到 'elasticsearch-head'...
remote: Counting objects: 4224, done.
remote: Total 4224 (delta 0), reused 0 (delta 0), pack-reused 4224
接收对象中: 100% (4224/4224), 2.16 MiB | 126.00 KiB/s, done.
处理 delta 中: 100% (2329/2329), done.
[wangshumin@CentOSNode1 bin]$ cd elasticsearch-head
[wangshumin@CentOSNode1 elasticsearch-head]$ ll
总用量 44
-rw-rw-r--. 1 wangshumin wangshumin  248 1月  28 23:29 Dockerfile
-rw-rw-r--. 1 wangshumin wangshumin  221 1月  28 23:29 Dockerfile-alpine
-rw-rw-r--. 1 wangshumin wangshumin  104 1月  28 23:29 elasticsearch-head.sublime-project
-rw-rw-r--. 1 wangshumin wangshumin 2171 1月  28 23:29 Gruntfile.js
-rw-rw-r--. 1 wangshumin wangshumin 3482 1月  28 23:29 grunt_fileSets.js
-rw-rw-r--. 1 wangshumin wangshumin 1088 1月  28 23:29 index.html
-rw-rw-r--. 1 wangshumin wangshumin  559 1月  28 23:29 LICENCE
-rw-rw-r--. 1 wangshumin wangshumin  886 1月  28 23:29 package.json
-rw-rw-r--. 1 wangshumin wangshumin  100 1月  28 23:29 plugin-descriptor.properties
drwxrwxr-x. 4 wangshumin wangshumin   53 1月  28 23:29 proxy
-rw-rw-r--. 1 wangshumin wangshumin 6944 1月  28 23:29 README.textile
drwxrwxr-x. 5 wangshumin wangshumin  140 1月  28 23:29 _site
drwxrwxr-x. 4 wangshumin wangshumin   31 1月  28 23:29 src
drwxrwxr-x. 4 wangshumin wangshumin   70 1月  28 23:29 test
[wangshumin@CentOSNode1 elasticsearch-head]$ npm install
npm WARN package.json elasticsearch-head@0.0.0 license should be a valid SPDX license expression
npm WARN deprecated coffee-script@1.10.0: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
npm WARN deprecated http2@3.3.7: Use the built-in module in node 9.0.0 or newer, instead
npm WARN engine hawk@6.0.2: wanted: {"node":">=4.5.0"} (current: {"node":"4.4.7","npm":"2.15.8"})
npm WARN optional dep failed, continuing fsevents@1.1.3
/
> phantomjs-prebuilt@2.1.16 install /home/wangshumin/ekl/node-v4.4.7-linux-x64/bin/elasticsearch-head/node_modules/grunt-contrib-jasmine/node_modules/grunt-lib-phantomjs/node_modules/phantomjs-prebuilt
> node install.js


PhantomJS not found on PATH
Downloading https://github.com/Medium/phantomjs/releases/download/v2.1.1/phantomjs-2.1.1-linux-x86_64.tar.bz2
Saving to /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2
Receiving...
  [=====================================---] 92%
Error making request.
Error: read ECONNRESET
    at exports._errnoException (util.js:873:11)
    at TLSWrap.onread (net.js:557:26)


Please report this full log at https://github.com/Medium/phantomjs
npm ERR! Linux 3.10.0-693.el7.x86_64
npm ERR! argv "/home/wangshumin/ekl/node-v4.4.7-linux-x64/bin/node" "/home/wangshumin/ekl/node-v4.4.7-linux-x64/bin/npm" "install"
npm ERR! node v4.4.7
npm ERR! npm  v2.15.8
npm ERR! code ELIFECYCLE


npm ERR! phantomjs-prebuilt@2.1.16 install: `node install.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the phantomjs-prebuilt@2.1.16 install script 'node install.js'.
npm ERR! This is most likely a problem with the phantomjs-prebuilt package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node install.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs phantomjs-prebuilt
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! 
npm ERR!     npm owner ls phantomjs-prebuilt
npm ERR! There is likely additional logging output above.


npm ERR! Please include the following file with any support request:
npm ERR!     /home/wangshumin/ekl/node-v4.4.7-linux-x64/bin/elasticsearch-head/npm-debug.log
[wangshumin@CentOSNode1 elasticsearch-head]$ ll
总用量 784
-rw-rw-r--.  1 wangshumin wangshumin    248 1月  28 23:29 Dockerfile
-rw-rw-r--.  1 wangshumin wangshumin    221 1月  28 23:29 Dockerfile-alpine
-rw-rw-r--.  1 wangshumin wangshumin    104 1月  28 23:29 elasticsearch-head.sublime-project
-rw-rw-r--.  1 wangshumin wangshumin   2171 1月  28 23:29 Gruntfile.js
-rw-rw-r--.  1 wangshumin wangshumin   3482 1月  28 23:29 grunt_fileSets.js
-rw-rw-r--.  1 wangshumin wangshumin   1088 1月  28 23:29 index.html
-rw-rw-r--.  1 wangshumin wangshumin    559 1月  28 23:29 LICENCE
drwxrwxr-x. 12 wangshumin wangshumin    218 1月  28 23:40 node_modules
-rw-rw-r--.  1 wangshumin wangshumin 755901 1月  28 23:40 npm-debug.log
-rw-rw-r--.  1 wangshumin wangshumin    886 1月  28 23:29 package.json
-rw-rw-r--.  1 wangshumin wangshumin    100 1月  28 23:29 plugin-descriptor.properties
drwxrwxr-x.  4 wangshumin wangshumin     53 1月  28 23:29 proxy
-rw-rw-r--.  1 wangshumin wangshumin   6944 1月  28 23:29 README.textile
drwxrwxr-x.  5 wangshumin wangshumin    140 1月  28 23:29 _site
drwxrwxr-x.  4 wangshumin wangshumin     31 1月  28 23:29 src
drwxrwxr-x.  4 wangshumin wangshumin     70 1月  28 23:29 test
[wangshumin@CentOSNode1 elasticsearch-head]$ vim  Gruntfile.js
[wangshumin@CentOSNode1 elasticsearch-head]$ ll
总用量 784
-rw-rw-r--.  1 wangshumin wangshumin    248 1月  28 23:29 Dockerfile
-rw-rw-r--.  1 wangshumin wangshumin    221 1月  28 23:29 Dockerfile-alpine
-rw-rw-r--.  1 wangshumin wangshumin    104 1月  28 23:29 elasticsearch-head.sublime-project
-rw-rw-r--.  1 wangshumin wangshumin   2171 1月  28 23:29 Gruntfile.js
-rw-rw-r--.  1 wangshumin wangshumin   3482 1月  28 23:29 grunt_fileSets.js
-rw-rw-r--.  1 wangshumin wangshumin   1088 1月  28 23:29 index.html
-rw-rw-r--.  1 wangshumin wangshumin    559 1月  28 23:29 LICENCE
drwxrwxr-x. 12 wangshumin wangshumin    218 1月  28 23:40 node_modules
-rw-rw-r--.  1 wangshumin wangshumin 755901 1月  28 23:40 npm-debug.log
-rw-rw-r--.  1 wangshumin wangshumin    886 1月  28 23:29 package.json
-rw-rw-r--.  1 wangshumin wangshumin    100 1月  28 23:29 plugin-descriptor.properties
drwxrwxr-x.  4 wangshumin wangshumin     53 1月  28 23:29 proxy
-rw-rw-r--.  1 wangshumin wangshumin   6944 1月  28 23:29 README.textile
drwxrwxr-x.  5 wangshumin wangshumin    140 1月  28 23:29 _site
drwxrwxr-x.  4 wangshumin wangshumin     31 1月  28 23:29 src
drwxrwxr-x.  4 wangshumin wangshumin     70 1月  28 23:29 test
[wangshumin@CentOSNode1 elasticsearch-head]$ npm install
npm WARN package.json elasticsearch-head@0.0.0 license should be a valid SPDX license expression
npm WARN engine hawk@6.0.2: wanted: {"node":">=4.5.0"} (current: {"node":"4.4.7","npm":"2.15.8"})
-
> phantomjs-prebuilt@2.1.16 install /home/wangshumin/ekl/node-v4.4.7-linux-x64/bin/elasticsearch-head/node_modules/grunt-contrib-jasmine/node_modules/grunt-lib-phantomjs/node_modules/phantomjs-prebuilt
> node install.js


PhantomJS not found on PATH
Downloading https://github.com/Medium/phantomjs/releases/download/v2.1.1/phantomjs-2.1.1-linux-x86_64.tar.bz2
Saving to /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2
Receiving...
  [===-------------------------------------] 7%^C
[wangshumin@CentOSNode1 elasticsearch-head]$ npm run start


> elasticsearch-head@0.0.0 start /home/wangshumin/ekl/node-v4.4.7-linux-x64/bin/elasticsearch-head
> grunt server


Running "connect:server" (connect) task
Waiting forever...
Started connect web server on http://localhost:9100
<think>嗯,用户现在遇到了一个GitHub认证失败的问题,提示密码认证不再支持,需要改用其他方式。首先,我需要理解这个错误信息的具体含义。GitHub在2021年8月移除了对密码认证的支持,所以用户现在用HTTPS克隆仓库时,必须使用个人访问令牌(PAT)或者其他认证方式,比如SSH。 接下来,用户之前的对话中提到了git clone的目录问题,现在这个错误是在克隆另一个仓库时出现的。用户可能是在尝试克隆时输入了密码,导致认证失败。我需要向用户解释为什么会出现这个问题,并提供解决方案。 我应该先解释错误的原因,然后分步骤说明如何解决。可能用户不太熟悉如何生成PAT或者配置SSH密钥,所以需要详细的步骤,包括生成令牌、使用令牌克隆仓库,或者生成SSH密钥并添加到GitHub账户。同时,用户可能是在WSL环境下操作,需要确保这些步骤在Linux环境中正确执行。 另外,用户可能对HTTPS和SSH的区别不太清楚,需要简要说明两者的不同,以及各自的优缺点。比如,HTTPS可能需要每次输入令牌,而SSH则通过密钥对自动认证,可能更方便。 还需要注意用户的实际操作环境,确保提供的命令适用于WSL的Linux系统,比如使用终端命令生成SSH密钥,或者使用git config来缓存凭证。同时,提醒用户不要在Windows目录下操作,避免性能问题,这和之前的对话内容相关。 最后,要检查是否有其他可能的问题,比如网络问题或者仓库是否存在,但根据错误信息,主要问题还是认证方式。需要确保用户按照步骤操作后能够成功克隆仓库,并且理解以后如何避免类似问题。</think>--- ### 一、错误原因解析 你遇到的错误信息: ```bash remote: Support for password authentication was removed on August 13, 2021. remote: Please see https://docs.github.com/.../cloning-with-https-urls fatal: Authentication failed for 'https://github.com/liyuxuan/ardupilot.git/' ``` **核心问题**: GitHub 已于 **2021 年 8 月 13 日** 停止支持通过 **密码直接认证** 的 HTTPS 协议操作仓库。 - 如果直接使用 `git clone https://...` 并输入 GitHub 账户密码,会触发此错误。 - 必须改用 **个人访问令牌(PAT)** 或 **SSH 密钥** 完成认证。 --- ### 二、解决方案(任选其一) #### 方案 1:使用 HTTPS + 个人访问令牌(PAT) ##### 步骤: 1. **生成个人访问令牌**: - 登录 GitHub → Settings → Developer settings → Personal Access Tokens → Generate new token - 勾选权限(至少包含 `repo` 和 `workflow`) - 生成后**立即复制令牌**(关闭页面后无法再次查看) 2. **克隆仓库时使用令牌替代密码**: ```bash git clone https://github.com/liyuxuan/ardupilot.git ``` - 当提示输入用户名时,填写你的 GitHub 用户名 - 当提示输入密码时,**粘贴刚才复制的令牌** ##### 特点: - 每次推送/拉取代码需输入令牌(可搭配 `git config credential.helper store` 缓存凭证) --- #### 方案 2:使用 SSH 密钥认证(推荐) ##### 步骤: 1. **生成 SSH 密钥对**(如果已有可跳过): ```bash ssh-keygen -t ed25519 -C "your_email@example.com" ``` - 按回车接受默认保存路径(`~/.ssh/id_ed25519`) - 设置密钥密码(可选,但建议增加安全性) 2. **将公钥添加到 GitHub**: ```bash cat ~/.ssh/id_ed25519.pub # 复制输出的内容 ``` - 登录 GitHub → Settings → SSH and GPG keys → New SSH key - 粘贴公钥内容并保存 3. **通过 SSH 克隆仓库**: ```bash git clone git@github.com:liyuxuan/ardupilot.git ``` ##### 特点: - 无需每次输入密码/令牌 - 安全性更高(基于非对称加密) --- ### 三、两种协议的对比 | 特性 | HTTPS 协议 | SSH 协议 | |-------------------|----------------------------|--------------------------| | **认证方式** | 用户名 + 个人访问令牌 (PAT) | 密钥对 (私钥 + 公钥) | | **是否需要网络代理** | 依赖系统代理设置 | 通常无需特殊配置 | | **适用场景** | 临时操作或简单脚本 | 长期开发或高频操作 | --- ### 四、附加问题排查 1. **检查 SSH 连接是否成功**: ```bash ssh -T git@github.com ``` - 如果显示 `You've successfully authenticated!` 表示 SSH 配置正确 2. **避免路径混淆**(与 WSL/Windows 目录问题相关): - 确保在 WSL 的 Linux 目录(如 `/home/yourname`)下操作,**不要**在 `/mnt/c/` 等 Windows 挂载目录执行克隆(如你之前强调的性能问题) --- ### 五、操作验证示例 以 SSH 方式克隆仓库: ```bash # 确认当前目录在 WSL 的 Linux 文件系统 cd ~ git clone git@github.com:liyuxuan/ardupilot.git ``` - 若成功,将输出: ```bash Cloning into 'ardupilot'... Warning: Permanently added 'github.com' (ECDSA) to the list of known hosts. Receiving objects: 100% (12345/12345), done. ``` --- ### 六、扩展建议 - **长期开发项目**:优先选择 SSH 协议,避免频繁认证 - **自动化脚本**:可结合 `GITHUB_TOKEN` 环境变量使用 HTTPS 协议 - **权限管理**:个人访问令牌的权限应遵循最小化原则(仅勾选必要权限)
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值