【问题标题】:Copy folder from github从 github 复制文件夹
【发布时间】:2021-09-24 16:15:19
【问题描述】:

我正在创建一个需要从文件夹复制信息的插件。我在 GitHub 上托管该文件夹。但是,当编译器尝试从文件夹中复制文件时,它会报错:

Copy error: Error: Command failed: cp -r "https://github.com/myarea/AR-plugin/tree/main/VDARSDK.framework" "/var/lib/builder/builds/4b578bb6-f8eb-410e-bd26-20412ed06d6a/source/plugins/cordova-plugin-pixlive/vendor/PixLive/VDARSDK.framework"

cp: cannot stat ‘https://github.com/myarea/AR-plugin/tree/main/VDARSDK.framework’: No such file or directory

Error: Unable to copy VDARSDK.framework. Check the path of the PIXLIVE_SDK_IOS_LOCATION variable. Given: 'undefined' 

我做错了什么?

【问题讨论】:

    标签: android plugins copy


    【解决方案1】:

    我也无法访问您上传的文件夹,这让我觉得它不是公开的。如果对该文件夹的访问受到限制,您的程序也将无法读取它。

    这里一位用户解释了如何读取原始 GitHub 文件:What do raw.githubusercontent.com URLs represent?

    这里如何更改 GitHub 中存储库的可见性:https://docs.github.com/en/enterprise-server@2.21/github/administering-a-repository/managing-repository-settings/setting-repository-visibility

    【讨论】:

    • 我已更改网址。我保证,每个人都可以访问该文件。
    • 我尝试使用原始 URL 没有成功。
    • 不是。当我打开您的个人资料MyyArea 时,我没有看到任何存储库。您的 AR-plugin 存储库是私有的。您可以通过打开隐身标签并打开 https://github.com/myarea/AR-plugin/tree/main/VDARSDK.framework 来检查这一点。你会得到一个404 NOT FOUND
    • 就像我说的,我已经更改了 URL。 MyyArea 这不是我的个人资料。我更改了网址,因为我不想在 stackoverflow 中分享我的个人资料
    • 我找到了解决这个问题的方法。我正在使用另一个地方来放置我的文件,因为 GitHub 中的链接是针对带有文件的网页的,我需要一个指向该文件的直接链接。
    【解决方案2】:

    GitHub 中的链接不是直接链接。原始 GitHub 允许访问文件的未处理版本,它对文件夹没有用处。尝试将文件夹托管在其他地方。

    【讨论】:

      猜你喜欢
      • 2020-06-10
      • 1970-01-01
      • 2012-08-20
      • 1970-01-01
      • 2016-06-13
      • 2013-05-17
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多