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 = git@git.xxxx.com: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