1. .gitconfig找不到
第一次在as中配置git后,出现了严重的错误,当你在一个本地仓库中 右键 git bash here后,你的 .gitconfig 文件就会找不到,出现错误 xxx/xxx/%HOMEDRIVER%%HOME....%: can't find .gitconfig, 之类的错误,但是我发现我的电脑的用户变量并没有这两个东西,不知道是被删了还是本来就没有
解决方案:
在用户变量中新建一个 HOME, 变量值为包含有 .gitconfig 的路径,.gitconfig默认在User/xxx/下边,可以拷贝一份,这样也实现了修改 .gitconfig默认路径的效果
2. AS 报错:Push failed: Failed with error: Could not read from remote repository.
解决方案:
This is probably an Intellij problem. Your key are managed natively by ssh, and Intellij has it's own ssh program.
Go to the settings, search git->ssh executable then choose native