問題:我不是 Gitlab 實體的管理員,GitLab 的鏡像功能不起作用。現在我嘗試使用 GitHub 操作來完成這項作業。失敗的原因與此錯誤報告中的相同。https://github.com/SvanBoxel/gitlab-mirror-and-ci-action/issues/10
pushing to master branch at https://gitlab.com/zuedev/*********
warning: redirecting to https://gitlab.com/zuedev/*********.git/
To https://gitlab.com/zuedev/*********
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'https://gitlab.com/zuedev/*********'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
問題:我該如何解決這個問題?我只是想宣布 GitLab 是冷的并與 GitHub 合作。
uj5u.com熱心網友回復:
對我來說,gitlab 的遷移功能很好用。我只需要在 github 中創建一個 api-token 并使用給定的令牌將具有適當憑據的 github 專案匯入 gitlab。
關于您上面的錯誤訊息,您的 gitlab 存盤庫似乎已經遠程進行了更改,當您創建一個空存盤庫時不應該是這種情況。
可能有幫助的是執行以下操作:
- 在本地克隆您的 github 存盤庫
- 將您的 gitlab 存盤庫添加為交替遠程
- 將本地存盤庫推送到交替遠程
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/488209.html
標籤:混帐 github GitLab github-动作 行动
