Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

typora 報錯401 #70

Open
syuanc19 opened this issue Aug 23, 2023 · 1 comment
Open

typora 報錯401 #70

syuanc19 opened this issue Aug 23, 2023 · 1 comment

Comments

@syuanc19
Copy link

報錯內容:
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
Copy link
Owner

pluveto commented Aug 24, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants