[Seek Help] 使用Fastgithub无法使用https连接github的问题
Tofloor
poster avatar
大川小朋友
deepin
2023-04-12 08:39
Author

已经根据论坛内的帖子进行了如下处理,总算是可以连上github了

image.png

但是依然没有解决使用https连接的问题

因为需要通过源码编译的方式安装ROS2,因此https连接还是必要的

image.png

求助,如何使用Fastgithub使用https协议连接Github呢

Reply Favorite View the author
All Replies
黄榛
deepin
2023-04-12 17:25
#1

fastgithub不行,速度太慢,建议使用ghprox.com(注意x后加个y)

将以下内容添加到 ~/.gitconfig文件后面,git命令会自动替换URL,其他命令可以手动改。

[url "https://ghprox.com/https://github.com/"]
        insteadOf = https://github.com/
[url "https://ghprox.com/https://github.com/"]
        insteadOf = git://github.com/
[url "https://ghprox.com/https://objects.githubusercontent.com/"]
        insteadOf = https://objects.githubusercontent.com/

上面只改了我常用的,有需要的可以自己添加其他支持的URL

Reply View the author
大川小朋友
deepin
2023-04-13 21:42
#2
黄榛

fastgithub不行,速度太慢,建议使用ghprox.com(注意x后加个y)

将以下内容添加到 ~/.gitconfig文件后面,git命令会自动替换URL,其他命令可以手动改。

[url "https://ghprox.com/https://github.com/"]
        insteadOf = https://github.com/
[url "https://ghprox.com/https://github.com/"]
        insteadOf = git://github.com/
[url "https://ghprox.com/https://objects.githubusercontent.com/"]
        insteadOf = https://objects.githubusercontent.com/

上面只改了我常用的,有需要的可以自己添加其他支持的URL

因为安装ROS使用的是批处理的命令(?)所以可能无法使用更改.gitconfig的方式进行修改。

image.png

Reply View the author
黄榛
deepin
2023-04-14 17:34
#3
大川小朋友

因为安装ROS使用的是批处理的命令(?)所以可能无法使用更改.gitconfig的方式进行修改。

image.png

~/.gitconfig是对当前用户生效的,只要你这个不运行在虚拟环境或者以其他用户身份运行都应该有效,你可以设置环境变量 export GIT_TRACE=1看看git运行的命令有什么问题。

Reply View the author