25

回答:

存储库已被管理员脱机。维护者 (Theo Fidry) 被锁定。使存储库脱机的原因目前尚不清楚。

前往https://github.com/nelmio/alice/issues/1089获取更多信息和可能的解决方法。

原始问题:

一个著名的 Symfony 框架包现在正在发生一些奇怪的事情。我不知道是否有可以询问的实时频道,所以我在这里询问,希望其他人注意到:

  1. 我刚刚在我的 CI/CD 管道中遇到了由 Composer 包引起的错误 - 显然 Github 存储库https://github.com/hautelook/AliceBundle被短暂地设为私有或删除。
  2. 大约 10 分钟后,存储库重新显示为https://github.com/theofidry/AliceBundle,这次是https://github.com/nowiko/AliceBundle的一个分支

我有截图,谷歌有一些缓存(比较https://webcache.googleusercontent.com/search?q=cache:V9Wz5RytGcsJ:https://github.com/hautelook/AliceBundle+&cd=1&hl=en&ct=clnk&gl= au&client=safarihttps://github.com/hautelook/AliceBundle)。

这里最大的问题是:发生了什么事?这是一场可能的供应链攻击吗?


一些资源

原始存储库状态:

原始存储库状态

没有版本、标签等的分叉回购:

没有发布、标签等的分叉回购

我得到的管道错误:

    Failed to download hautelook/alice-bundle from dist: The "https://api.github.com/repos/hautelook/AliceBundle/zipball/17c5199b2a6efbc1383b0afe1cddfa3c176b7b6f" file could not be downloaded (HTTP/2 404 )
    Now trying to download from source
  - Syncing hautelook/alice-bundle (2.9.0) into cache
                                                                                                              
  [RuntimeException]                                                                                          
  Failed to clone https://github.com/hautelook/AliceBundle.git via https, ssh protocols, aborting.            
                                                                                                              
  - https://github.com/hautelook/AliceBundle.git                                                              
    Cloning into bare repository '/root/.composer/cache/vcs/https---github.com-hautelook-AliceBundle.git'...  
    remote: Invalid username or password.                                                                     
    fatal: Authentication failed for 'https://github.com/hautelook/AliceBundle.git/'                          
                                                                                                              
  - git@github.com:hautelook/AliceBundle.git                                                                  
    Cloning into bare repository '/root/.composer/cache/vcs/https---github.com-hautelook-AliceBundle.git'...  
    error: cannot run ssh: No such file or directory                                                          
    fatal: unable to fork                                                                                     
4

2 回答 2

12

正如该软件包的维护者 Théo Fidry 所建议的那样:他的 Github 帐户拥有一个最新的分叉,可以通过将以下设置添加到 composer.json 来使用它:

    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/theofidry/AliceBundle"
        }
    ],
于 2021-09-10T08:07:13.953 回答
3

这可能不是您问题的直接答案,但我希望它可以帮助像我一样在 CI 管道中遇到巨大麻烦的人。由于theofidry上传的版本至少需要PHP 7.3(而我的旧应用程序不满足此要求),我为解决该问题所做的工作是:

  1. 转到本地开发中的项目文件夹
  2. 将文件夹 vendor/hautelook/alice-bundle 复制到某处
  3. 在复制的文件夹中运行 git init
  4. 创建一个 git 存储库(例如在 github 上)并推送内容
  5. 回到您的项目,更新您的 composer.json,将 hautelook/alice-bundle 使用的版本更改为“dev-master”并添加一个 vcs 存储库,如下所示
  6. 运行 composer update 你应该没问题

相应地调整网址:

"repositories": [
    {
        "type": "vcs",
        "url": "git@github.com:YourRepository/AliceBundle"
    }
]

只有当您在某处已经有 AliceBundle 的版本时,该解决方案才有效

于 2021-09-10T08:04:31.697 回答