GitHub API limits when using composer

If we are using composer to satisfy our dependencies and we found the following error:

Could not fetch X, enter your GitHub credentials to go over the API rate limit  

That's because github api have a limit of calls, so you are not more able to call github api instead we have to user git to pull our repos.

To solve this problem we are gonna use git instead the default configuration on composer that use the github api which have limits:

$ php composer.phar install --prefer-source --no-interaction

Plus have in mind that if we add our composer.lock file to our repo it won't need to look for every version of the package on the repo.