[tutorial] GitHub + PicGo + VSCode Extension
๐ Introduction
This article provides a tutorial on setting up GitHub, PicGo, and a VSCode extension to facilitate image uploading to GitHub repositories. It outlines the necessary prerequisites, the procedure to generate a GitHub token, and essential steps for configuring the PicGo extension in VSCode.
๐ Quick Start
Before You Start
Make sure you have following:
- A Github Token with access to your repo
- A repo to store images
GitHUb
Generate GitHub Token
- Go to
Settings/Developer settings/Personal access tokens/Token (classic)
- Click Generate new token (classic)
- Set a name for the token to identify it easily and choose No expiration
- Select the required scopes for the token
Set Up Repo
To ensure your images are accessible, set your repo to public.
VScode Extension
- Install PicGo extension in VScode
- Set
Pic Bed: Current
to github - Set
Pic Bed > Github: Repo
to your previously created public repo. Format is{username}/{repo_name}
- Set
Pic Bed: Uploader
to github - Set
Pic Bed > Github: Branch
to the branch of your public repo - Set
Pic Bed > Github: Path
(Optional). If you want to store images in specific folder (e.g.images
). Make sure to include a trailing slash (/
), otherwise, it will be used as a prefix for image names - Set
Pic Bed > Github: Token
to the Github token you created earlier
Troubleshooting
If you see the following error, it means xclip
is not installed:
1 | PicGo: xclip not found! Please install xclip before run picgo. |
To fix this, install xclip
using the following command:
1 | sudo apt install xclip |
๐ Recap
- You need a Github token and a public repository for image storage.
- Install the PicGo extension in VSCode for image uploading.
- Follow specific configuration steps in the PicGo extension to link it with GitHub.
- Potential troubleshooting includes ensuring
xclip
is installed on your system.
[tutorial] GitHub + PicGo + VSCode Extension
https://hsiangjenli.github.io/blog/tutorial_github_picgo_vscode/