【发布时间】:2020-10-09 08:33:54
【问题描述】:
根据@bk2204 的要求,这是this question 的后续行动。
我正在尝试使用 Github Actions 将 repo 从一个组织镜像到另一个组织。有问题的步骤是:
- name: Copy to Cloudyr
if: runner.os == 'Linux' # && github.ref == 'refs/heads/master'
env:
token: "${{ secrets.ghPat }}"
run: |
export CLOUDYR_REPO=$(echo $GITHUB_REPOSITORY | sed "s/Azure/cloudyr/")
git config -l | grep 'http\..*\.extraheader' | cut -d= -f1 | \
xargs -L1 git config --unset-all
git push --prune https://token:$token@github.com/${CLOUDYR_REPO}.git +refs/remotes/origin/*:refs/heads/* +refs/tags/*:refs/tags/*
但是,这会导致错误:
Run export CLOUDYR_REPO=$(echo $GITHUB_REPOSITORY | sed "s/Azure/cloudyr/")
To https://github.com/cloudyr/AzureAuth.git
! [remote rejected] master (refusing to delete the current branch: refs/heads/master)
! [remote rejected] origin/fix-ghaction -> fix-ghaction (shallow update not allowed)
error: failed to push some refs to 'https://github.com/cloudyr/AzureAuth.git'
我该如何解决这个问题?我对有问题的两个存储库都有管理员访问权限。
失败日志在这里:https://github.com/Azure/AzureAuth/runs/1228871427?check_suite_focus=true
【问题讨论】:
标签: git github github-actions