Unable to get a github repository either by downloading the Zip file or cloning

john john 946 Reputation points
2020-11-26T00:23:00.933+00:00

I want to install the Script Editor Webpart from this url @ https://github.com/pnp/sp-dev-fx-webparts.. but if i try to download the zip file it will break in the middle + i tried to use the GitHub desktop but i will keep getting this error:-

42758-git.png

so any advice how i can download or clone this repository? and can i only download the related files for the modern script editor instead of having to download the whole repository?

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,105 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Amos Wu-MSFT 4,051 Reputation points
    2020-11-26T02:47:45.173+00:00

    This problem should be because the entire repository is too big, we need to use SSH to clone the repository, not HTTP.

    1. Check if the machine already has an SSH key. Enter the following command ls -al ~/.ssh, if there is a file id_rsa.pub or id_dsa.pub, go directly to step 3 to add the SSH key to GitHub, otherwise, go to the second step to generate an SSH key.
      42819-image.png
      42794-image1.png
    2. Generate SSH key.
      ssh-keygen -t rsa -C "your_emial@examle.com"  
      
      42690-image2.png ssh-agent bash
      ssh-add ~/.ssh/id_rsa

    42891-image.png
    Then you could open the id_rsa.pub to get the SSH key.
    42775-image.png
    3. Add the generated key to GitHub.
    42808-image3.png
    Then you could clone the repository to your computer.
    42853-image.png
    42707-image4.png
    Download a single folder or directory from a GitHub repo


    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.