当我尝试从bitbucket将Angular应用程序部署到Netlify时,出现以下错误。
这些是整理日志。
11:38:49 PM: Build ready to start
11:38:51 PM: build-image version: 7c49b266ed8abd833dee6036ec0a4b9ee887658a
11:38:51 PM: buildbot version: f58df58ab0bceffdcb8d1e60fec992495a2a6751
11:38:51 PM: Fetching cached dependencies
11:38:51 PM: Starting to download cache of 254.8KB
11:38:51 PM: Finished downloading cache in 129.507361ms
11:38:51 PM: Starting to extract cache
11:38:51 PM: Failed to fetch cache, continuing with build
11:38:51 PM: Starting to prepare the repo for build
11:38:52 PM: git ref refs/heads/dashboard-angular does not exist or you do not have permission
11:38:52 PM: Failing build: Failed to prepare repo
11:38:52 PM: failed during stage 'preparing repo': git ref refs/heads/dashboard-angular does not exist
11:38:52 PM: Finished processing build request in 833.373404ms
答案 0 :(得分:1)
通常发生这种情况是因为Netlify没有权限提取您的源代码。 Netlify仅通过Deploy Key访问存储库。 除非安装/登录用户具有管理访问权限,否则Netlify不能在任何git服务(GitHub,GitLab或BitBucket)上自动安装部署密钥。
获得适当的权限并通过Netlify的UI重新链接后,部署密钥已成功安装,并且拉入Netlify的CI效果更好。
Netlify's helpdesk可以在工作流中提供管理权限不可用的建议。