I'm on a fresh FreeBSD install and want to download and run a post-install script from a private BitBucket repo. My fetch attempt returns an authentication error:~# fetch https://bitbucket.org/me/server/raw/abcde...xyz/post-install.shCertificate verification failed for /C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert High Assurance EV CA-134380949368:error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed:/usr/src/secure/lib/libssl/../../../crypto/openssl/ssl/s3_clnt.c:1180:fetch: https://bitbucket.org/me/server/raw/abcde...xyz/post-install.sh: Authentication errorIs there a way to authenticate (from command-line or prompt for username/password) and download the file without installing additional packages?Edit 1:The following wget commands do work:~# wget --no-check-certificate --user myname --password mypass https://bitbucket.org/me/server/raw/abcde...xyz/post-install.sh~# wget --no-check-certificate https://myname:mypass@bitbucket.org/me/server/raw/abcde...xyz/post-install.shHowever, the following fetch still fails:~# fetch --no-verify-peer https://myname:mypass@bitbucket.org/me/server/raw/abcde...xyz/post-install.shBut it doesn't throw an error, it just downloads the wrong file---an HTML BitBucket login form.Edit 2:As @SteveWills deduced, BitBucket doesn't care much for fetch; changing the user-agent allowed authentication to work:~# fetch --no-verify-peer --user-agent Wget/1.16 (freebsd10.0) https://myname:mypass@bitbucket.org/me/server/raw/abcde...xyz/post-install.sh
Fetch, authenticate, and download a post-install script on FreeBSD
system installation;freebsd;authentication
Adding the --no-verify-peer option will fix the certification verification error. If you want to authentication, just add the user/pass to the url like https://user:password@host.domain/path