问题:picgo上传图片失败
`在搭建picgo+typora+Github+CDN时,picgo上传图片一直失败!
尝试了很多方法,如:删除仓库名里的空格、打开servers等,全部都失败了
后来尝试打开日志文件,分析里面的错误
image-20210816194520855
找到一个回答,发现是我的“分支名”写错了
image-20210816194704710
现在github没有master了,全部叫main
MD,气死了!!
网上看的教程都是以前的,都写着master,所以一直上传失败
总结:出现问题,去看错误日志,然后根据里面的记录来分析问题和在网上查找答案,不要瞎几把搜!!
–2021.08.17
出现了新的问题
image-20210817194527867
2021-08-17 19:29:25 [PicGo ERROR] ------Error Stack Begin------ StatusCodeError: 401 - {“message”:“Bad credentials”,“documentation_url”:“https://docs.github.com/rest”} at new StatusCodeError (D:\PicGo\resources\app.asar\node_modules\request-promise-core\lib\errors.js:32:15) at Request.plumbing.callback (D:\PicGo\resources\app.asar\node_modules\request-promise-core\lib\plumbing.js:104:33) at Request.RP$callback [as _callback] (D:\PicGo\resources\app.asar\node_modules\request-promise-core\lib\plumbing.js:46:31) at Request.self.callback (D:\PicGo\resources\app.asar\node_modules\request\request.js:185:22) at Request.emit (events.js:200:13) at Request. (D:\PicGo\resources\app.asar\node_modules\request\request.js:1161:10) at Request.emit (events.js:200:13) at IncomingMessage. (D:\PicGo\resources\app.asar\node_modules\request\request.js:1083:12) at Object.onceWrapper (events.js:288:20) at IncomingMessage.emit (events.js:205:15) -------Error Stack End-------
解决方案:删除旧的token,生成新的token