pluveto / upgit

Another upload hub that supports clipboard. It works well with Typora, Snipaste, VSCode.
MIT License
529 stars 44 forks source link

typora 報錯401 #70

Open syuanc19 opened 11 months ago

syuanc19 commented 11 months ago

報錯內容: fail to parse result image path from: Failed: unexpected status code 401. response: {"message":"Bad credentials","documentation_url":"https://docs.github.com/rest"}

配置:

默认上传器

default_uploader = "github"

Github 上传器

[uploaders.github]

保存文件的分支,例如 master 或 main

branch = "master"

您的拥有"repo"权限的 Github 令牌

获取Github Token连接: https://github.com/settings/tokens

pat = "ghp_*****" //此處隱藏

您的公共Github存储库的名称

注意: 为了让您和他人可以访问到图片资源, 您的Github仓库一定要是公开的,

在私有仓库中Github会拦截未授权的请求,你将会得到一个404.

repo = "picbed"

您的 Gtihub 用户名

username = "syuanc19"

-- 不知為何總是報錯,查了查都是404,不曉得401是甚麼情況,謝謝

pluveto commented 11 months ago

Bad credentials 意思就是你的 token 没有对应权限或者 token 无效,可以尝试用此 token 直接 git push 看看