检查github.com oauth访问:失败

时间:2019-01-19 14:33:30

标签: php docker github composer-php

ENV::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 问题仍然存在。任何人都可以建议我如何解决该问题?

1 个答案:

答案 0 :(得分:0)

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

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