Anonymous read-only Git access

yilu@bupt.edu.cn yilu@bupt.edu.cn
Thu Mar 5 08:12:00 GMT 2020


Thank you so much! It all works, and I've finished it.



Beenle Yi
yilu@bupt.edu.cn
 
From: Liu Hao
Date: 2020-03-05 15:31
To: gcc-help; Xi Ruoyao; yilu@bupt.edu.cn
Subject: Re: Anonymous read-only Git access
在 2020/3/5 14:33, Xi Ruoyao 写道:
> On 2020-03-05 13:50 +0800, yilu@bupt.edu.cn wrote:
>> Hi,everyone
>> I want to get the GCC-10 source and I followed the instructions in 
>> https://gcc.gnu.org/git.html, however, the command
>> git clone git://gcc.gnu.org/git/gcc.git SomeLocalDir
>> cannot work. 
>> And I found I cannot connect https://gcc.gnu.org/git/gcc.git even without
>> firewall(I'm in China). I got a 403 Forbidden
>>  "You don't have permission to access /git/gcc.git/ on this server."
>>  "Apache Server at gcc.gnu.org Port 443".  
>> What can I do in this situation? 
> 
> I guess some guy in BUPT "attacked" gcc.gnu.org somehow (maybe unintentionally,
> just playing or testing some software) and caused the entire IP segment to be
> banned.
> 
> You should contact the administrator of gcc.gnu.org.  In the meantime try
> 
>     git clone https://mirrors.tuna.tsinghua.edu.cn/git/gcc.git
> 
> It would be very fast since this mirror is in your city :).
> 
> (OT: Several BUPT students commenced some unsported behavior in our programming
> contests.  So our online judge is also banning BUPT IP segments.)
> 
 
The fact that Git may utilize HTTPS protocol doesn't imply that you can
list its contents with a web browser.
 
 
If you have issues cloning GCC's official GCC repo, here is some mitigation:
 
  # Create an empty repo with a working tree.
  mkdir gcc
  cd gcc
  git init
 
  # Add mirrors by hand.
  git remote add origin https://gcc.gnu.org/git/gcc.git
  git remote add github https://github.com/gcc-mirror/gcc.git
  git remote add tuna https://mirrors.tuna.tsinghua.edu.cn/git/gcc.git
 
  # Fetch from reachable mirrors first.
  # TUNA is unlikely to be unreachable from you, however it is
  # slightly left behind other mirrors.
  # This will fetch the bulk of the repo.
  git fetch tuna
 
  # Fetch more data from another mirror.
  # Objects that have been fetched from TUNA will not be fetched again.
  # There's supposed to be much fewer bytes to download.
  # GitHub is slower, but is less likely to be blocked by Chinese ISPs.
  git fetch github
 
  # Check out the master branch and initializes the working tree.
  # This is usually a bit behind `origin/master`.
  git checkout -b master github/master
 
 
  # Fetch data that have not been mirrored yet.
  # You may postpone this until you have access.
  git fetch origin
 
  # Set up its tracking branch.
  # You only need to set it once.
  # Note: This requires a successful fetch from `origin`.
  #       If that is not possible for you, please skip this step.
  git branch master --set-upstream-to=origin/master
 
 
-- 
Best regards,
LH_Mouse
 


More information about the Gcc-help mailing list