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.
- Log in to GitHub.com
- Click your profile picture (top-right) → Settings
- Scroll down the left sidebar → Developer settings
- Click Personal access tokens → Tokens (classic)
- Click Generate new token → Generate new token (classic)
- Set:
- Note:
Docusar Clone Token - Expiration:
90 daysorNo expirationfor ease - Select scopes: Check
repo(all repo permissions)
- Note:
- Click Generate token
- 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, exampleghp_aBcDeFg123456YOUR_USERNAME→ Your GitHub username, examplesonandrestYOUR_REPO→ Your repository name, exampledocusar-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:
Desktop/docusar-template(the empty cloned repo with a hidden.gitfolder)Desktop/docusar-project(your Docusar template from the download)
Do this:
- Open the
docusar-projectfolder - Select all files (Ctrl + A) - Make sure you can also see hidden files
- Copy all (Ctrl + C)
- Open
docusar-template(the cloned repo folder) - Paste all (Ctrl + V)
- If it asks to overwrite, click Yes. Do not overwrite the
.gitfolder - 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.