使用github的actions将github仓库同步到gitee时,原理是使用gitee提供的api接口来推送数据,但是在昨天(2025-05-28)时出现异常,如下图:

actions_list

gitee_403

调用api时提示403,但是本地可以调用成功,怀疑是gitee限制请求ip了。

没门了,得想办法解决这个问题。

使用同时往gitee/github推送这个功能吧

在gitee中配置好ssh-key公钥

在要同步的仓库中的.git/config的 [remote "origin"]中复制一个url=,参考下面

[remote "origin"]
	url = git@github.com:yourname/reponame.git
+	url = git@gitee.com:yourname/reponame.git
	fetch = +refs/heads/*:refs/remotes/origin/*

使用git push即可。

该操作可以通过命令行实现:

git remote set-url --add origin git@gitee.com:yourname/reponame.git
# 查看
git remote get-url --all origin
git remote get-url  origin

而今天(2025-09-29)晚上看时,竟然又正常了。

action_list_is_ok