Skip to main content

Clone GitHub Repo to Local Device

After you create your GitHub repository, you need to clone it to your computer so you can push your Docusar project into it.

Step 1: Create a Personal Access Token (PAT)​

GitHub no longer allows passwords for git clone. You need a Personal Access Token.

  1. Log in to GitHub.com
  2. Click your profile picture (top-right) → Settings
  3. Scroll down the left sidebar → Developer settings
  4. Click Personal access tokens → Tokens (classic)
  5. Click Generate new token → Generate new token (classic)
  6. Set:
    • Note: Docusar Clone Token
    • Expiration: 90 days or No expiration for ease
    • Select scopes: Check repo (all repo permissions)
  7. Click Generate token
  8. Copy the token - Example: ghp_xxxxxxxxxxxxxx - You will not see it again, so save it.

Step 2: Open Terminal and Go to Desktop​

Open Terminal / CMD / Git Bash.

Go to where you want to clone, usually the Desktop:

For Windows:

cd C:\Users\YourPCName\Desktop

For Mac/Linux:

cd ~/Desktop

Replace YourPCName with your computer username. To check where you are, run pwd.

Step 3: Run Git Clone​

Now clone your repo with this format:

git clone https://YOUR_TOKEN@github.com/YOUR_USERNAME/YOUR_REPO.git

Replace:

  • YOUR_TOKEN → Your personal access token from Step 1, example ghp_aBcDeFg123456
  • YOUR_USERNAME → Your GitHub username, example sonandrest
  • YOUR_REPO → Your repository name, example docusar-template

Real example:

git clone https://ghp_aBcDeFg123456@github.com/sonandrest/docusar-template.git

Press Enter. If successful, you will see:

Cloning into 'docusar-template'...
remote: Enumerating objects...
remote: Counting objects: 100% (10/10), done.

Now you have a folder Desktop/docusar-template or Desktop/YOUR_REPO. This is your cloned repo.

Alternative method (more secure):

If you do not want the token in the URL, just run:

git clone https://github.com/YOUR_USERNAME/YOUR_REPO.git

Git will ask for a Username and Password. For Username, enter your GitHub username. For Password, paste your Personal Access Token (not your GitHub password).

Step 4: Move Your Docusar Project Files​

Now you have 2 folders on your Desktop:

  1. Desktop/docusar-template (the empty cloned repo with a hidden .git folder)
  2. Desktop/docusar-project (your Docusar template from the download)

Do this:

  1. Open the docusar-project folder
  2. Select all files (Ctrl + A) - Make sure you can also see hidden files
  3. Copy all (Ctrl + C)
  4. Open docusar-template (the cloned repo folder)
  5. Paste all (Ctrl + V)
  6. If it asks to overwrite, click Yes. Do not overwrite the .git folder - keep it.

Now your Docusar files are inside the cloned GitHub repo folder.

Step 5: Verify​

Open the cloned folder and check:

cd docusar-template
dir # or ls for Mac

You should see files like docusaurus.config.js, package.json, src/, static/, data/, and the hidden .git folder.