加入收藏 | 设为首页 | 会员中心 | 我要投稿 北几岛 (https://www.beijidao.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 大数据 > 正文

php – 当使用具有私有VCS的composer时,它无限地要求授权

发布时间:2021-08-28 03:46:07 所属栏目:大数据 来源: https://www.jb51.cc
导读:在我的composer.json中,我有一个私有的vcs存储库: { "type": "vcs", "url": "https://github.com/username/repo.git"} 当我调用PHP composer.phar更新时,我得到以下内容: Your GitHub credentials are required to fetch private repository Metadata (htt

在我的composer.json中,我有一个私有的vcs存储库:

{
    "type": "vcs",
    "url": "https://github.com/username/repo.git"
}

当我调用PHP composer.phar更新时,我得到以下内容:

Your GitHub credentials are required to fetch private repository Metadata (https://github.com/username/repo.git)
The credentials will be swapped for an OAuth token stored in /root/.composer/config.json, your password will not be stored
To revoke access to this token you can visit https://github.com/settings/applications

Username: myusername
Password:
    Authentication required (api.github.com):
      Username: myusername
      Password:
    Authentication required (api.github.com):
      Username: myusername
      Password:
    Authentication required (api.github.com):
      Username:

无论我多少次投入我的github凭据,它一直在问.如果我输错了它会做同样的事情,没有错误或最大尝试.

任何想法会导致什么?我通过运行使用最新版本可检索:

PHP composer.phar self-update

周围的工作

作为一个现在的解决方法我已经去过:https://github.com/settings/applications并手动生成令牌然后运行:

PHP composer.phar config -g github-oauth.github.com <token>

但我仍然想知道为什么它不能自动完成

解决方法:

这是因为当前版本的作曲家aa74818fe00c5f5eb57c1c38b807e9e2950c670c不支持GitHubs 2因子授权.因此,任何具有该设置的帐户都会遇到此问题.

已经为它创建了一个pull请求,应该很快进入即将发布的版本更新之一.

(编辑:北几岛)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读