Skip to content

Commit

Permalink
switch the proxy server for github
Browse files Browse the repository at this point in the history
  • Loading branch information
IceCodeNew committed Dec 8, 2022
1 parent 8915f2d commit 865ac9f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions alpine_getting_start.sh
Expand Up @@ -48,7 +48,7 @@ self_update() {
# Should any error occured during quering `api.github.com`, do not execute this script.
[[ x"${geoip_is_cn:0:1}" = x'y' ]] &&
sed -i -E -e 's!github.com/(.+/download/)!github.com.mirror.icecode.xyz/\1!g' "$HOME/alpine_getting_start.sh" &&
git config --global url."https://hub.fastgit.xyz".insteadOf https://github.com
git config --global url."https://ghproxy.com/https://github.com".insteadOf https://github.com
[[ x"$local_script_version" = x"$remote_script_version" ]] &&
install_binaries
sleep $(( ( RANDOM % 10 ) + 1 ))s && curl -i "https://purge.jsdelivr.net/gh/IceCodeNew/go-collection@master/alpine_getting_start.sh"
Expand Down Expand Up @@ -505,7 +505,7 @@ install_binaries() {
checksec --dir=/usr/local/bin
checksec --listfile=<(echo -e '/usr/bin/bat\n/usr/bin/fd\n/usr/bin/hexyl\n/usr/bin/minify\n/usr/local/sbin/haproxy\n/usr/local/sbin/caddy')

git config --global --unset url.https://hub.fastgit.xyz.insteadof
git config --global --unset url.https://ghproxy.com/https://github.com.insteadof
git config --global --list
exit 0
}
Expand Down
4 changes: 2 additions & 2 deletions getting_start.sh
Expand Up @@ -72,7 +72,7 @@ self_update() {
# Should any error occured during quering `api.github.com`, do not execute this script.
[[ x"${geoip_is_cn:0:1}" = x'y' ]] &&
sed -i -E -e 's!github.com/(.+/download/)!github.com.mirror.icecode.xyz/\1!g' "$HOME/getting_start.sh" &&
git config --global url."https://hub.fastgit.xyz".insteadOf https://github.com
git config --global url."https://ghproxy.com/https://github.com".insteadOf https://github.com
[[ x"$local_script_version" = x"$remote_script_version" ]] &&
install_binaries
sleep $(( ( RANDOM % 10 ) + 1 ))s && curl -i "https://purge.jsdelivr.net/gh/IceCodeNew/go-collection@master/getting_start.sh"
Expand Down Expand Up @@ -573,7 +573,7 @@ install_binaries() {
checksec --dir=/usr/local/bin
checksec --listfile=<(echo -e '/usr/bin/bat\n/usr/bin/fd\n/usr/bin/hexyl\n/usr/bin/caddy\n/usr/bin/minify\n/usr/local/sbin/haproxy')

git config --global --unset url.https://hub.fastgit.xyz.insteadof
git config --global --unset url.https://ghproxy.com/https://github.com.insteadof
git config --global --list
exit 0
}
Expand Down
4 changes: 2 additions & 2 deletions void_getting_start.sh
Expand Up @@ -48,7 +48,7 @@ self_update() {
# Should any error occured during quering `api.github.com`, do not execute this script.
[[ x"${geoip_is_cn:0:1}" = x'y' ]] &&
sed -i -E -e 's!github.com/(.+/download/)!github.com.mirror.icecode.xyz/\1!g' "$HOME/void_getting_start.sh" &&
git config --global url."https://hub.fastgit.xyz".insteadOf https://github.com
git config --global url."https://ghproxy.com/https://github.com".insteadOf https://github.com
[[ x"$local_script_version" = x"$remote_script_version" ]] &&
install_binaries
sleep $(( ( RANDOM % 10 ) + 1 ))s && curl -i "https://purge.jsdelivr.net/gh/IceCodeNew/go-collection@master/void_getting_start.sh"
Expand Down Expand Up @@ -365,7 +365,7 @@ END_TEXT

################

git config --global --unset url.https://hub.fastgit.xyz.insteadof
git config --global --unset url.https://ghproxy.com/https://github.com.insteadof
git config --global --list
exit 0
}
Expand Down

0 comments on commit 865ac9f

Please sign in to comment.