Git:could not read from remote repository。
首先再git后台,检查是否有对应工程的权限
1 检查idea工程project目录下的.git文件夹下的.config文件,origin配置是否正确
打开.config文件,url有两种方式:https的方式、ssh的方式,检查对应的url是否正确文章来源:https://www.toymoban.com/news/detail-713344.html
[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
文章来源地址https://www.toymoban.com/news/detail-713344.html
到了这里,关于IDEA Git 报错could not read from remote repository的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!