I have tried different methods to install this, but it still does not work. I am trying to clone from github using git clone https://github.com/CocaPods/Specs.git master. Please share your ideas. I am using Mac Sierra with 8GB Ram.

I have tried different methods to install this, but it still does not work. I am trying to clone from github using git clone https://github.com/CocaPods/Specs.git master. Please share your ideas. I am using Mac Sierra with 8GB Ram.

This error most likely cause of low buffer size of git. Other reason, Antivirus or Firewall could be modifying the HTTP packets.
$ git config --global http.postBuffer 2MAntivirus or Firewall for some time and try clone again.not sure if your problem is cloning or running some command of the project.
to clone try both:
git clone https://github.com/CocoaPods/Specs.gitgit clone git@github.com:CocoaPods/Specs.git