idea使用git无法连接远程仓库(Could not read from remote repository) 但git Bash可以 --git远程地址的跟换
idea使用git连接时(pull,push)报错:Could not read from remote repository但是git Bash可以提交经过10分钟的检查后发现是地址类型的问题http://jiong@127.0.0.1:12345/r/code/wawu.git //idea可以连接ssh://jiong@127.0.0.1:12345/code/wawu.git //idea
·
idea使用git连接时(pull,push)报错:Could not read from remote repository
但是git Bash可以提交
经过10分钟的检查后发现是地址类型的问题
http://jiong@127.0.0.1:12345/r/code/wawu.git //idea可以连接
ssh://jiong@127.0.0.1:12345/code/wawu.git //idea不能连接
这里记录一下更换git远程连接地址的方法
git remote -v //查看远程仓库信息
git remote remove origin //移除名为origind的本地远程仓库信息
git remote add origin http://jiong@127.0.0.1:12345/r/code/wawu.git //添加远程仓库地址
我这种情况改了之后就可以提交了
不过在提交是要填写远程仓库名称和分支名,如:
git pull origin master
为了不输入后面的名称和分支名,这里记录一下设置默认远程名称和分支名的方法
git branch --set-upstream-to=origin/master
//git branch --set-upstream-to=[远程仓库名称]/[远程仓库分支名称]
更多推荐
已为社区贡献1条内容
所有评论(0)