php – 当使用具有私有VCS的composer时,它无限地要求授权
发布时间:2020-12-13 16:52:43 所属栏目:PHP教程 来源:网络整理
导读:在我的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 (http
在我的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请求,应该很快进入即将发布的版本更新之一. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |