Git同时push到Gitee和Github仓库 与 Github对密码认证的支持于2021年8月13日被删除

目录

Git同时push到Gitee和Github仓库

Github对密码认证的支持于2021年8月13日被删除

Git同时push到Gitee和Github仓库

  修改 .git/confit 文件,如下,然后就可以一条push命令让Gitee和Github仓库同时同步了

[core]
	repositoryformatversion = 0
	filemode = false
	bare = false
	logallrefupdates = true
	symlinks = false
	ignorecase = true
[remote "origin"]
	url = https://github.com/xxx/Test.git
	fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
	remote = origin
	merge = refs/heads/master

=> 改为

[core]
	repositoryformatversion = 0
	filemode = false
	bare = false
	logallrefupdates = true
	symlinks = false
	ignorecase = true
[remote "origin"]
	url = https://github.com/xxx/Test.git
	url = https://gitee.com/xxx/Test.git
	fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
	remote = origin
	merge = refs/heads/master

Github对密码认证的支持于2021年8月13日被删除

  Support for password authentication was removed on August 13, 2021.  Please use a personal access token instead.

  意思很明确,2021年8月13日后提交代码需要用token代替账号密码进行鉴权

https://github.com/xxx/Test.git

=> 改为

https://你的token@github.com/xxx/Test.git


版权声明:本文为zhumj_zhumj原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。