npm 安装 git linux,NPM安装在Linux上未能通过HTTP身份验证

我想跑

npm install git+https://bitbucket.org/User/Repository

在Linux Raspbian 8.0上。但是,我得到这个错误:

npm ERR! Error while executing:

npm ERR! /usr/bin/git ls-remote -h -t https://bitbucket.org/User/Repository.git

npm ERR!

npm ERR! remote: Invalid username or password

npm ERR! fatal: Authentication failed for 'https://bitbucket.org/User/Repository.git/'

npm ERR!

npm ERR! exited with error code: 128

我的BitBucket用户名和应用程序密码

应该

在全局和目录git配置中都可用:

git config user.name "Username"

git config user.password "Password"

git config --global user.name "Username"

git config --global user.password "Password"

因此,正确的用户名和密码应该可以用于

npm

使用,但似乎不使用它们。

此外,为免生疑问,我已通过将用户名和密码与

git

直接。

任何帮助解决这个问题的人都将不胜感激!

编辑

感谢MatthieuMoy在评论中指出,我使用的配置值实际上对Git没有任何特殊意义。

According to documentation

,用户名和密码组合可以存储在

~/.git-credentials

. 我已经这样做了,在形式上

https://Username:Password@bitbucket.org

. 然而,同样的错误仍然存在。我已经验证用户名和应用程序密码是否正确。Git似乎根本没有使用它们。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值