首页 > 解决方案 > 检查 github.com oauth 访问:失败

问题描述

ENV: docker,MAC-OS,我正在运行以下命令。

composer diagnose

收到以下消息

Checking composer.json: WARNING
No license specified, it is recommended to do so. For closed-source software you may use "proprietary" as license.

require.AB/Modules : exact version constraints (3.17) should be avoided if the package follows semantic versioning
require.

ABC/mongodb-library : exact version constraints (1.15) should be avoided if the package follows semantic versioning
require.tecnickcom/tcpdf : exact version constraints (6.2) should be avoided if the package follows semantic versioning
require.

ABC/dns-cache-client : exact version constraints (1.0.3) should be avoided if the package follows semantic versioning

Checking platform settings: The OpenSSL library (0.9.8zc) used by PHP does not support TLSv1.2 or TLSv1.1.


If possible you should upgrade OpenSSL to version 1.0.1 or above.

Checking git settings: OK

Checking http connectivity to packagist: OK

Checking https connectivity to packagist: OK

Checking github.com oauth access: **FAIL
[Composer\Downloader\TransportException] The "https://api.github.com/" file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages:
error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
Failed to enable crypto
failed to open stream: operation failed**

Checking disk free space: OK

Checking pubkeys: 


Tags Public Key Fingerprint: xxx

Dev Public Key Fingerprint: xxx


OK

Checking composer version: OK

Composer version: 1.8.0

PHP version: 5.6.21

PHP binary path: /usr/local/php5/bin/php

**Installed openssl**

    openssl version

LibreSSL 2.2.7

我已经用这个命令和 composer.json 全局添加了令牌。

composer config -g github-oauth.github.com XXXXXXXXXXXXXXXXXXXXXXX

https://www.previousnext.com.au/blog/managing-composer-github-access-personal-access-tokens 问题仍然存在。任何人都可以建议我如何解决这个问题?

标签: phpdockergithubcomposer-php

解决方案


它通过授予所有权限来工作:

-在xampp的htdocs文件夹里面,它不起作用是php版本问题 -在外面生成文件夹,然后将它们复制并粘贴到htdocs上


推荐阅读