937Creating entries for htpasswd

htpasswd -nb username password

Using just -n username will prompt twice for the password.

htpasswd -n username

From htpasswd man:

-n Don't update file; display results on stdout.
-b Use the password from the command line rather than prompting for it.

860Access a URL behind htaccess/htpasswd

Access a htaccess/htpasswd protected URL programmatically:

https://username:passwd@www.trembl.org/protected/area/

See also: Pulling a GitHub Repository with Tokens & Webhooks