Don't forget to save it(gitee personal token) in your device.
Before installing Picgo-Core, we need to install Nodejs.
# install nodejs and npm sudo apt install nodejs -y sudo apt install npm -y # check installation result node -v npm -v
# install cnpm sudo npm install -g cnpm # before installing Picgo-Core, we need use an image source for npm to accelarate downloading npm install express --registry=https://registry.npm.taobao.org # use cnpm to install Picgo-Core sudo cnpm install picgo -g
# install gitee-uploader plugin picgo install gitee-uploader
# enter the root of picgo configuration file cd ~/.picgo/ # modify the configuration of config.json vim config.json
config.json
{ "picBed": { "current": "gitee", "uploader": "gitee", "smms": { "token": "" }, "gitee": { "message": "added a picture", "owner": "gitee_username", "branch": "master", "path": "images_folder_path", "repo": "gitee_username/repository_name", "token": "personal token for gitee repository" } }, "picgoPlugins": { "picgo-plugin-gitee-uploader": true }, "picgo-plugin-gitee-uploader": { "lastSync": "2021-11-25 04:11:52" } }
# get public-key wget -qO - https://typora.io/linux/public-key.asc | sudo apt-key add - # add Typora's repository sudo add-apt-repository 'deb https://typora.io/linux ./' sudo apt-get update # install typora sudo apt-get install typora
Use Custom Command Mode to upload image to gitee repository by Picgo-Core
# set uploading instruction /usr/local/lib/nodejs/bin/node /usr/lib/node_modules/picgo/bin/picgo upload
Then, let's verify the availability of uploading service..
Now, you can enjoy the convenience of automatic image uploading service.