Not able to install through composer

Hi, I’m new to the Yii framework and I have already installed it on my personal mac computer. The thing is that I cant install it on the mac at the office.

Strangely I follow all the steps the same as on my mac but when I try to download the basic or the advanced template it fails with the following error:




[Composer\Downloader\TransportException]                                     

  The "can't embed urls on my first post..." file could not be downloaded (HTTP/1.  

  1 400 Bad Request)  



also when i run "sudo composer self-update" it sais


You are already using composer version 9f6fdfd703f433bd0777fd89fb4684908a6c4f06

and running composer diagnose tells me:




Checking platform settings: OK

Checking git settings: OK

Checking http connectivity to packagist: FAIL

[Composer\Downloader\TransportException] The "packagist.org/packages.json" file could not be downloaded (HTTP/1.1 400 Bad Request)

Checking https connectivity to packagist: OK

Checking github.com rate limit: OK

Checking disk free space: OK

Checking composer version: OK



Also I’m not able to install the composer assets plugging. When running the command it tells me the same [Transport Exception] as when trying to download the template.

Honestly I’v searched everywhere and can’t find a solution for this.

Thanks in advanced.

I am totally new to Yii; I just installed it in a Ubuntu Server yesterday and ran into the same problem. I found that the problem was DNS related and by editing, in my case, /etc/network/interfaces and added dns-nameserver entries solved the problem.

for example, I use COMCAST and I am in South Florida so I use




dns-nameservers 75.75.75.75