作为新年的一项决议,我试图在今年为我的博客写几篇文章。但是,在使用Netlify
发布它们时遇到了麻烦。尝试部署时收到以下消息
4:46:43 PM: Build ready to start
4:46:44 PM: build-image version: 53a2d5fe9ca22a80747972bf7a83d93509ec503c
4:46:44 PM: buildbot version: 4011bc275ed1e45f93e758dff0bce4fda2a3c46f
4:46:45 PM: Fetching cached dependencies
4:46:45 PM: Starting to download cache of 254.7KB
4:46:45 PM: Finished downloading cache in 91.447642ms
4:46:45 PM: Starting to extract cache
4:46:45 PM: Failed to fetch cache, continuing with build
4:46:45 PM: Starting to prepare the repo for build
4:46:45 PM: git ref refs/heads/master does not exist or you do not have permission
4:46:45 PM: Failing build: Failed to prepare repo
4:46:45 PM: failed during stage 'preparing repo': git ref refs/heads/master does not exist
4:46:45 PM: Finished processing build request in 754.802626ms
我注意到netlify
Build Settings
中有一个base directory
选项没有为我的博客设置。我查看了有关部署的blogdown
文档,看起来它们也基于旧版本的netlify
(https://bookdown.org/yihui/blogdown/netlify.html),并且没有提及base directory
选项。
我也将HUGO_VERSION
中的0.53
更改为Build Environment variables
以匹配最新版本。我希望这不是问题。
任何人都可以帮助我解决此问题,特别是为我的网站设置Base directory
的问题。
我的博客文件的github
存储库位于https://github.com/sn248/sn248.github.io
,网站(内容最少)位于https://sn248.rbind.io/
此外,新帖子已添加并按预期显示在本地,即当我使用blogdown::serve_site()
时。
谢谢