Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

URL could not be accessed: HTTP/1.1 400 Bad URI

I want to create a new laravel project via composer and I have got this error

 [Composer\Downloader\TransportException]
  The 'http://packagist.org/p/fideloper/proxy%249271e19129358853986ed3ca9315ced11a42439a57f49537033c3b436a6ff543.json
  ' URL could not be accessed: HTTP/1.1 400 Bad URI

enter image description here

like image 538
Abdul Fattah Boshi Avatar asked Jul 25 '18 18:07

Abdul Fattah Boshi


1 Answers

This question gets asked pretty frequently either here, github, or elsewhere. I'd almost say that this should be a community wiki entry. I've ran into this problem myself, as well, and here's a list of things to inspect and ensure they're not the cause (good chance one of them is the cause):

(Also, run composer diagnose -vvv ahead of time, then look at the list below)

  1. Proxy is incorrectly configured
  2. Firewall is incorrectly configured
  3. Bad global environment settings (bashrc, profile, etc)
  4. Outdated composer version
  5. Slow/degrading network performance
  6. Misconfigured git addons
  7. Incorrect settings in your hosts file
  8. SSH tunnelling misconfiguration
  9. GitHub/GitLab/etc. rate limiting

Note This is a poor answer, and isn't a good format for SO, really.

like image 61
Ohgodwhy Avatar answered Oct 23 '22 08:10

Ohgodwhy