src/client/http_client.rs: new password_env option

This commit is contained in:
Dietmar Maurer
2020-01-27 10:42:19 +01:00
parent 5030b7cea4
commit 99d863d770
2 changed files with 21 additions and 9 deletions

View File

@ -167,6 +167,7 @@ fn connect(server: &str, userid: &str) -> Result<HttpClient, Error> {
let options = HttpClientOptions::new()
.prefix(Some("proxmox-backup".to_string()))
.password_env(Some("PBS_PASSWORD".to_string()))
.interactive(true)
.fingerprint_cache(true)
.ticket_cache(true);
@ -1476,6 +1477,7 @@ async fn try_get(repo: &BackupRepository, url: &str) -> Value {
let options = HttpClientOptions::new()
.prefix(Some("proxmox-backup".to_string()))
.password_env(Some("PBS_PASSWORD".to_string()))
.interactive(false)
.fingerprint_cache(true)
.ticket_cache(true);