0


IDEA Git 报错could not read from remote repository

Git:could not read from remote repository。

首先再git后台,检查是否有对应工程的权限

1 检查idea工程project目录下的.git文件夹下的.config文件,origin配置是否正确

打开.config文件,url有两种方式:https的方式、ssh的方式,检查对应的url是否正确

[core]
	repositoryformatversion = 0
	filemode = false
	bare = false
	logallrefupdates = true
	symlinks = false
	ignorecase = true
[remote "origin"]
	url = https://git.xxxx.com/his/xxxx.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 = [email protected]:xxxx/xxxx.git
	fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
	remote = origin
	merge = refs/heads/master

2 如果正确,请配置ssh 密钥,网上随便搜索一大堆,
idea配置git ssh
3 最后删除known_hosts,请执行 ssh -T git@xxxxx,把你的gitlab加入到known_hosts

标签: intellij-idea git java

本文转载自: https://blog.csdn.net/hankthon/article/details/132847949
版权归原作者 timeout03 所有, 如有侵权,请联系我们删除。

“IDEA Git 报错could not read from remote repository”的评论:

还没有评论