日常沙雕问题
前言:遇到问题,1. 升级; 2. 重启;3. 打开搜索引擎。
github port 443: Timed out
- 场景:以 https 方式 clone 仓库时出现的错误。
- 原因:Git 所设端口与系统代理不一致。
- 解决方法:
- 查看电脑的网络代理的 IP/端口,windows: 设置 - 网络与Internet - 代理。
- 修改 git 的 http.proxy/https.proxy。修改
\~/.gitconfig 文件,或:
git config --global http.proxy http://127.0.0.1:7890
git config --global https.proxy http://127.0.0.1:7890 - 取消 git 代理配置:
git config --global --unset http.proxy - 查看 git 代理配置:
git config --global --get http.proxy
- 参考:https://zhuanlan.zhihu.com/p/636418854
github pages 404: index.html not found
- 问题: github pages workflow 构建完毕后,打开页面显示 404,找不到 index.html。
- 原因: git settings > Pages > Build and Deployment, 设置为 from a branch + master。而 hugo 编译后提交在了 hg-pages 分支。
- 解决: 改了分支就可以了。
衍生问题: 在 settings 配置 custom domain,生效;提交代码再次触发 action 重新部署,失效。
- 原因: actions-gh-pages 没有拿到配置的 cname。
- 解决: 在 worflow 的配置中添加参数
cname: custom.doamin.com 。