Uploaded image for project: 'Buildr (Retired)'
  1. Buildr (Retired)
  2. BUILDR-577

Allow remote repo to be added with http basic auth support

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 1.5
    • Packaging
    • None

    Description

      Allow for remote repositories to pass in auth information in addition to the url. The patch will allow options of passing in a String, Hash, or URI

      repositories.remote << "http://repository.jboss.org/nexus/content/groups/public-jboss"
      repositories.remote << { :url => "http://repository.jboss.org/nexus/content/groups/public-jboss", :username => 'username', :password => 'password' }
      repositories.remote << URI.parse( "uri" )

      repositories.remote is now an instance of Buildr::RepositoryArray, an extension of Array. The methods that add/change the array have been overridden to convert input into the format of {:url => URI, :username => String, :password => String}, with :username and :password being optional.

      repositories.remote now return repos in the format of an Array of {:url => URI, :username => String, :password => String}, so that is a consideration for backward compatibility.

      Artifact#download_artifact now passes the auth information to URI.download. HTTP#read and HTTP#write_internal now check the passed in options for auth.

      SFTP is not supported by this patch. It would not be a difficult task, just have to consolidate with the existing options[:ssh_options] being passed in.

      Attachments

        1. repo_auth.patch
          4 kB
          Michael Guymon

        Activity

          People

            toulmean Antoine Toulme
            mguymon Michael Guymon
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: