doutuo3899 2018-12-05 09:01
浏览 103

公司网络中的PHP Composer问题

I want to install Matomo (https://matomo.org/) on Openshift. I can install a simple PHP Website without any problems. But when I try to install Matomo I get this Error in the Log when I start to build the Project.

Cloning "ssh://git@stash.mycompany.net:22/matomo/analysetool.git" ...
    Commit: 5f4878b33d3e7dbae65d4ef674ea71d6f3e054e9 (update composerfile)
    Author: Wilhelm, Tom <tom.wilhelm@mycompany.com>
    Date:   Fri Nov 30 14:28:33 2018 +0100

---> Installing application source...
Found 'composer.json', installing dependencies using composer.phar...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0curl: (7) Failed to connect to 2001:41d0:302:1100::8:104f: Network is unreachable
/usr/libexec/s2i/assemble: line 21: ./composer.phar: No such file or directory

error: build error: non-zero (13) exit code from artifactory.mycompany.net/rhscl/php-70-rhel7@sha256:0277d2c99328657e80822cc4ef3e5907e1e77cd0bd672ae497c98eeff37aefbd

The Problem is that the Server my Company runs does not allow access to Files outside the Network. I think the Error comes from the composer.json File:

{
    "name": "piwik/piwik",
    "type": "application",
    "description": "the leading free/libre analytics platform",
    "keywords": ["piwik","matomo","web","analytics"],
    "homepage": "https://matomo.org",
    "license": "GPL-3.0+",
    "authors": [
        {
            "name": "The Matomo Team",
            "email": "hello@matomo.org",
            "homepage": "https://matomo.org/team/"
        }
    ],
    "support": {
        "forum": "https://forum.matomo.org/",
        "issues": "https://github.com/matomo-org/piwik/issues",
        "wiki": "https://github.com/matomo-org/piwik/wiki",
        "source": "https://github.com/matomo-org/piwik"
    },
    "config":{
        "platform": {
            "php": "5.5.9"
        }
    },
    "require": {
        "php": ">=5.5.9",
        "twig/twig": "~1.0",
        "leafo/lessphp": "~0.5.0",
        "symfony/console": "~2.6.0",
        "tedivm/jshrink": "~0.5.1",
        "mustangostang/spyc": "~0.5.0",
        "piwik/device-detector": "~3.0",
        "piwik/decompress": "~1.0",
        "piwik/network": "~0",
        "piwik/cache": "~1.0.0",
        "piwik/ini": "^1.0.6",
        "php-di/php-di": "^5.0.0",
        "psr/log": "~1.0",
        "monolog/monolog": "~1.11",
        "symfony/monolog-bridge": "~2.6.0",
        "symfony/event-dispatcher": "~2.6.0",
        "pear/pear_exception": "~1.0.0",
        "matomo/referrer-spam-blacklist": "~1.0",
        "matomo/searchengine-and-social-list": "~1.0",
        "tecnickcom/tcpdf": "~6.0",
        "piwik/piwik-php-tracker": "^1.0",
        "composer/semver": "~1.3.0",
        "szymach/c-pchart": "^2.0",
        "geoip2/geoip2": "^2.8",
        "davaxi/sparkline": "^1.1"
    },
    "require-dev": {
        "aws/aws-sdk-php": "2.7.1",
        "phpunit/phpunit": "~4.8",
        "facebook/xhprof": "dev-master",
        "phpseclib/phpseclib": "~0.3.8",
        "symfony/var-dumper": "~2.6.0",
        "symfony/yaml": "~2.6.0"
    },
    "repositories": [
        {
            "type": "package",
            "package": {
                "name": "facebook/xhprof",
                "type": "library",
                "description": "XHProf: A Hierarchical Profiler for PHP",
                "keywords": ["profiling", "performance"],
                "homepage": "http://pecl.php.net/package/xhprof",
                "license": "Apache-2.0",
                "version": "master",
                "require": {
                    "php": ">=5.2.0"
                },
                "autoload": {
                    "files": [
                        "xhprof_lib/utils/xhprof_lib.php",
                        "xhprof_lib/utils/xhprof_runs.php"
                    ]
                },
                "source": {
                    "type": "git",
                    "url": "https://github.com/phacility/xhprof",
                    "reference": "master"
                }
            }
        }
    ],
    "scripts": {
        "pre-update-cmd": [
            "Piwik\\Composer\\ScriptHandler::cleanXhprof"
        ],
        "pre-install-cmd": [
            "Piwik\\Composer\\ScriptHandler::cleanXhprof"
        ],
        "post-update-cmd": [
            "Piwik\\Composer\\ScriptHandler::buildXhprof"
        ],
        "post-install-cmd": [
            "Piwik\\Composer\\ScriptHandler::buildXhprof"
        ]
    },
    "autoload": {
        "psr-4": {
            "Piwik\\Plugins\\": "plugins/",
            "Piwik\\": "core/"
        },
        "psr-0": {
            "Zend_": "libs/",
            "HTML_": "libs/",
            "PEAR_": "libs/",
            "Archive_": "libs/"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "Piwik\\Tests\\": "tests/PHPUnit/"
        }
    }
}

For this Case my Company has a JFrog Artifactory (https://jfrog.com/artifactory/). Now my Question is which File do I have to upload to the Artifactory and how Can I tell the Composer that he has to get the Files from the Artifactory and not from the Internet.

Thanks in advance

  • 写回答

0条回答

    报告相同问题?

    悬赏问题

    • ¥15 飞机曲面部件如机翼,壁板等具体的孔位模型
    • ¥15 vs2019中数据导出问题
    • ¥20 云服务Linux系统TCP-MSS值修改?
    • ¥20 关于#单片机#的问题:项目:使用模拟iic与ov2640通讯环境:F407问题:读取的ID号总是0xff,自己调了调发现在读从机数据时,SDA线上并未有信号变化(语言-c语言)
    • ¥20 怎么在stm32门禁成品上增加查询记录功能
    • ¥15 Source insight编写代码后使用CCS5.2版本import之后,代码跳到注释行里面
    • ¥50 NT4.0系统 STOP:0X0000007B
    • ¥15 想问一下stata17中这段代码哪里有问题呀
    • ¥15 flink cdc无法实时同步mysql数据
    • ¥100 有人会搭建GPT-J-6B框架吗?有偿