解决git clone提示You hasn‘t joined this enterprise

场景

git clone项目报:您尚未加入此企业

adodeMacBook-Pro:flutter ado$ git clone https://gitee.com/xxx/xxx-project.git
Cloning into 'uoffer-android'...
remote: [session-57469386] You hasn't joined this enterprise!
fatal: unable to access 'https://gitee.com/xxx/xxx-project.git/': The requested URL returned error: 403

原因

已经使用过其他账号拉过代码,所以有gitee账号的密钥信息。

解决

删除以前的密钥信息即可,再重新使用git clone拉代码。

mac

启动台中找到钥匙串访问打开


image.png

在所有项目中搜索gitee或者以前登录过的账号


image.png

右键删除即可


image.png

win

60e87ce9c4b687ec926b1a65beb7298.png

我走的路(mac)

1、当时我本地git用的是我的账号(未加入企业)账号zjy、密码123
2、我要克隆的一个项目是https://gitee.com/js/m-jj-front.git
3、我输入git clone https://gitee.com/js/m-jj-front.git,报了You hasn‘t joined this enterprise,您尚未加入此企业
4、我切换了一个git账号(该账号已加入企业),账号dq、密码456,重新git clone https://gitee.com/js/m-jj-front.git后,仍旧报那个错
5、然后,我删除了以前的密钥信息,重新git clone https://gitee.com/js/m-jj-front.git,成功了
6、为了验证,我又把git切换成我的账号(未加入企业)账号zjy、密码123,然后git clone https://gitee.com/js/m-jj-front.git,竟然成功了
7、所以我觉得,只要删除了以前的密钥信息,无论是zjy(未加入企业)还是dq(已加入企业)都是可以clone、pull、push的

image.png

我走的路(win)

1、我以前已经使用过其他账号拉过代码,所以有gitee账号的密钥信息。就是这个

77b3bf5fa12a1a5496c4756c1fc9a08.png

粘自https://developer.aliyun.com/article/1583218

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。