Skip to content

Commit

Permalink
Use curl's --netrc-optional option instead of --netrc
Browse files Browse the repository at this point in the history
Using --netrc forces the user to provide authentication credentials through a
.netrc file in the user's home folder if the remote server requires
authentication.

However a user may want to provide the credentials right in the url which has
the advantage of not being dependent on having build machines set up with the
.netrc file. In an enterprise environment - potentially using many build
machines and having many team members - it can become a hassle to ensure proper
configuration of all build environments.

Ideally we should be able to specify the path to the .netrc file using the
--netrc-file option but that's for another time.

CocoaPodsgh-55
  • Loading branch information
Sylvain Guillopé committed May 14, 2016
1 parent d544c07 commit e189947
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/cocoapods-downloader/http.rb
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def filename_with_type(type = :zip)
end

def download_file(full_filename)
curl! '-f', '-L', '-o', full_filename, url, '--create-dirs', '--netrc'
curl! '-f', '-L', '-o', full_filename, url, '--create-dirs', '--netrc-optional'
end

def extract_with_type(full_filename, type = :zip)
Expand Down

0 comments on commit e189947

Please sign in to comment.