amazon-web-services - Capistrano Deploy 无法找到 Github 存储库
问题描述
尝试在 AWS 上部署 Rails 应用程序时,我会收到以下错误bundle exec cap production deploy
00:01 git:update
01 git remote set-url origin git@github.com:AskBid/delegations-explorer-backend.git
✔ 01 deploy_user@ec2-x-x-x-x.eu-west-2.compute.amazonaws.com 0.066s
02 git remote update --prune
02 Fetching origin
✔ 02 deploy_user@ec2-x-x-x-x.eu-west-2.compute.amazonaws.com 1.148s
00:03 git:create_release
01 mkdir -p /var/www/delegations-explorer-backend/releases/20201229124628
✔ 01 deploy_user@ec2-x-x-x-x.eu-west-2.compute.amazonaws.com 0.065s
02 git archive master | /usr/bin/env tar -x -f - -C /var/www/delegations-explorer-backend/releases/20201229124628
02 fatal: Not a valid object name
02 tar:
02 This does not look like a tar archive
02
02 tar:
02 Exiting with failure status due to previous errors
02
我在网上发现了很多类似的问题,解决方法一直是他们没有在 GitHub 上推送存储库或者存储库不存在。
就我而言,回购就在那里..所以我不知道如何解决这个问题。
这是我的deploy.rb
set :application, "delegations-explorer-backend"
set :repo_url, "git@github.com:AskBid/delegations-explorer-backend.git"
set :linked_dirs, fetch(:linked_dirs, []).push('log', 'tmp/pids', 'tmp/cache', 'tmp/sockets', 'vendor/bundle', 'public/system', 'public/uploads')
set :rvm_ruby_version, '2.6.3'
set :passenger_restart_with_touch, true
解决方案
默认情况下,capistrano 部署master
分支。但是您的存储库仅包含一个main
分支。
只需将 capistrano 配置为从main
分支部署。
set :branch, "main"
推荐阅读
- r - 如何更改ggplot中的x轴标签
- vue.js - Vuex mapActions、mapGetters 等...在同一个调用中混合命名空间和非命名空间操作/getters/mutations/state?
- python - 我的朋友在尝试在 Lynda 上学习 Python 教程时,在 Visual Studio 中继续收到错误消息。关于如何解决这个问题的任何建议?
- python - pandas 分组和聚合
- react-native - 在博览会中接收通知时播放不同的声音
- angularjs - angular 6中是否有类似于angularJs form.firstname.$active的元素
- json - 将多行 json 字符串插入 helm 模板以进行 base64 编码
- javascript - JS:元素样式=值;第一次出现两次时未执行
- python - 构建注册页面时出错,/register/ 'RegisterForm' 对象的 AttributeError 没有属性 'cleaned_data'
- c++ - abs 函数在 C++ 中没有给出正确答案?