News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

BitExpert.de Blog:
Composer, Bower and HTTP Basic Auth
December 27, 2013 @ 11:16:23

Stephan Hochdörfer has shared a handy tip for the Composers users out there that may have to deal with username/password protected repositories as a part of your package install process. In his post he shows how to use a simple "expect" script to automatic the HTTP Basic Auth login.

A couple of months ago when we set-up our own internal Satis repository to host our custom Composer packages. We ran into an "unpleasant" issue with Composer that had this PR as an result. To sum things up: We are using HTTP Basic Auth to password-project our Satis repository. There was no way we could switch to an SSL client certificate to allow Composer to authenticate itself automatically without asking for a password. Asking for the password on a developer`s machine is no big thing, but it since we need an automated Composer run in our Jenkins environment, there was no way to set things up.

As Composer doesn't currently support this functionality, they had to find a way around it. They went with an expect script that is used to work with the prompts and send the username/password information when expected. He also points out that this could be useful for other situations and tools - like a Bower build.

0 comments voice your opinion now!
composer satis username password http basic authorization bower expect

Link: http://blog.bitexpert.de/blog/composer-bower-and-http-basic-auth/

blog comments powered by Disqus

Similar Posts

Chris Hartjes' Blog: How To HTTP-PUT A File Somewhere Using PHP

David Coallier's Blog: PHP Namespaces (Part 1: Basic usage & gotchas)

PHPBuilder.com: PEAR's HTML_QuickForm

Michael Nitschinger's Blog: Playing with Composer and Lithium

Rob Allen's Blog: Zend Framework 2 beta 4 released


Community Events

Don't see your event here?
Let us know!


example php7 series framework performance podcast voicesoftheelephpant symfony2 api xdebug conference interview library community version extension introduction opinion laravel release

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework