0

I'm creating a plugin that needs to copy information from a folder. I am hosting the folder on GitHub. However, when the compiler tries to copy the file from the folder it gives an error:

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' 

What am I doing wrong?

Andi Luis
  • 23
  • 7

2 Answers2

0

The folder you uploaded isn't accessible to me either, so that makes me think that it's not public. If access to the folder is restricted, your program won't be able to read it either.

Here a user explains how to read raw GitHub files: What do raw.githubusercontent.com URLs represent?

Here how to change the visibility of a repository in GitHub: https://docs.github.com/en/enterprise-server@2.21/github/administering-a-repository/managing-repository-settings/setting-repository-visibility

JonZarate
  • 841
  • 6
  • 28
  • I have changed the URL. The file is accessible to everyone, I guarantee. – Andi Luis Jul 15 '21 at 20:56
  • I've tried using the raw URL with no success. – Andi Luis Jul 15 '21 at 21:16
  • It's not. When I open your profile [MyyArea](https://github.com/myarea) I don't see any repositories. Your `AR-plugin` repository is private. You can check this by opening a Incognito Tab and opening `https://github.com/myarea/AR-plugin/tree/main/VDARSDK.framework`. You will get a `404 NOT FOUND`. – JonZarate Jul 16 '21 at 11:32
  • Like I've said, I have changed the URL. MyyArea it is not my profile. I have changed the url because I did not want to share my profile in stackoverflow – Andi Luis Jul 17 '21 at 13:22
  • I have found a workaround to this subject. I am using another place to put my files because the link in GitHub it's for a webpage with the file on it and I need a direct link to the file. – Andi Luis Jul 17 '21 at 13:24
  • So I was right, it was an accesibility problem. You can host files in GitHub. – JonZarate Jul 19 '21 at 08:51
  • You weren't right. You can't host files on GitHub. The GitHub link is not a direct link and the raw gives the unprocessed file. – Andi Luis Jul 19 '21 at 14:41
  • You can [host files on GitHub](https://www.labnol.org/internet/free-file-hosting-github/29092/). Even [large files](https://git-lfs.github.com/). – JonZarate Jul 20 '21 at 09:17
  • You can host but it is not a direct link to the files. It is a link to a page that shows the files in a window... – Andi Luis Jul 21 '21 at 10:02
  • In the _window_ there's a `Download` button and you can download the files. Any file. I uploaded a PDF and JPG to [this repo](https://github.com/JonZarate/StackOverflow). You can download the [JPG](https://raw.githubusercontent.com/JonZarate/StackOverflow/master/andiluis.jpg) and [PDF](https://raw.githubusercontent.com/JonZarate/StackOverflow/master/andiluis.pdf). If I spend some time trying to help you, at least open the links I send you. – JonZarate Jul 21 '21 at 10:37
  • Thank you for your time but I think you are not understanding the problem... the problem is that I need to cp the remote file (I think you have to use scp)... – Andi Luis Jul 23 '21 at 10:51
0

The links in GitHub are not direct links. The raw GitHub gives access to an unprocessed version of the file and it is not useful to folders. Try to host the folder in another place.

Andi Luis
  • 23
  • 7