From a00dd309798c5a99b12d702647bd3421bf9d79f9 Mon Sep 17 00:00:00 2001 From: Christoph Berganski Date: Wed, 22 Jul 2020 23:45:55 +0200 Subject: [PATCH 01/10] cmd: add parameters for configuration of WebDAV remotes Relates to iterative#1153, https://github.com/iterative/dvc/pull/4256 --- content/docs/command-reference/remote/add.md | 12 ++++ .../docs/command-reference/remote/modify.md | 59 +++++++++++++++++++ 2 files changed, 71 insertions(+) diff --git a/content/docs/command-reference/remote/add.md b/content/docs/command-reference/remote/add.md index adc643d7aa..da58a1a569 100644 --- a/content/docs/command-reference/remote/add.md +++ b/content/docs/command-reference/remote/add.md @@ -344,6 +344,18 @@ $ dvc remote add -d myremote https://example.com/path/to/dir
+### Click for WebDAV + +```dvc +$ dvc remote add -d myremote webdavs://example.com/path/to/dir +``` + +> See also `dvc remote modify` for a full list of WebDAV parameters. + +
+ +
+ ### Click for local remote A "local remote" is a directory in the machine's file system. diff --git a/content/docs/command-reference/remote/modify.md b/content/docs/command-reference/remote/modify.md index 279a791719..fd68953d86 100644 --- a/content/docs/command-reference/remote/modify.md +++ b/content/docs/command-reference/remote/modify.md @@ -582,6 +582,65 @@ more information.
+
+ +### Click for WebDAV + +- `token` - token for WebDAV server, can be empty in case of using + `user/password` authentication. + +- `user` - username for WebDAV server, can be empty in case of using `token` + authentication. The order in which DVC searches for username: + + 1. `user` specified in one of the DVC configs; + 2. `user` specified in the url(e.g. `webdav://user@example.com/path`); + + ```dvc + $ dvc remote modify --local myremote user myuser + ``` + +- `password` - password for WebDAV server, can be empty in case of using `token` + authentication. + + ```dvc + $ dvc remote modify myremote --local password mypassword + ``` + +> The username and password (may) contain sensitive user info. Therefore, it's +> safer to add them with the `--local` option, so they're written to a +> Git-ignored config file. + +- `ask_password` - ask each time for the password to use for `user/password` + authentication. + + ```dvc + $ dvc remote modify myremote ask_password true + ``` + + > Note that the `password` parameter takes precedence over `ask_password`. If + > `password` is specified, DVC will not prompt the user to enter a password + > for this remote. + +- `cert_path` - path to certificate used for WebDAV server authentication. + + ```dvc + $ dvc remote modify myremote cert_path /path/to/cert + ``` + +- `key_path` - path to private key to use to access a remote. + + ```dvc + $ dvc remote modify myremote key_path /path/to/key + ``` + +- `timeout` - connection timeout to use for WebDAV. + + ```dvc + $ dvc remote modify myremote timeout timeoutseconds + ``` + +
+ ## Example: Customize an S3 remote Let's first set up a _default_ S3 remote. From 9864d502f927640226e432bfe3e3e8605002c5b8 Mon Sep 17 00:00:00 2001 From: Jorge Orpinel Date: Wed, 22 Jul 2020 21:36:41 -0500 Subject: [PATCH 02/10] Update content/docs/command-reference/remote/modify.md --- content/docs/command-reference/remote/modify.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/command-reference/remote/modify.md b/content/docs/command-reference/remote/modify.md index fd68953d86..ce17b39813 100644 --- a/content/docs/command-reference/remote/modify.md +++ b/content/docs/command-reference/remote/modify.md @@ -593,7 +593,7 @@ more information. authentication. The order in which DVC searches for username: 1. `user` specified in one of the DVC configs; - 2. `user` specified in the url(e.g. `webdav://user@example.com/path`); + 2. `user` specified in the url (e.g. `webdav://user@example.com/path`) ```dvc $ dvc remote modify --local myremote user myuser From 6d7eeeb60f39bf90d9829325b3df09c6eaab2c8e Mon Sep 17 00:00:00 2001 From: Christoph Berganski Date: Thu, 23 Jul 2020 10:53:57 +0200 Subject: [PATCH 03/10] cmd: add token authentication example to remote modify for WebDAV Context: https://github.com/iterative/dvc.org/pull/1617#discussion_r459185785 --- content/docs/command-reference/remote/modify.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/content/docs/command-reference/remote/modify.md b/content/docs/command-reference/remote/modify.md index ce17b39813..efbf8d48ba 100644 --- a/content/docs/command-reference/remote/modify.md +++ b/content/docs/command-reference/remote/modify.md @@ -589,6 +589,10 @@ more information. - `token` - token for WebDAV server, can be empty in case of using `user/password` authentication. + ```dvc + $ dvc remote modify --local myremote token mytoken + ``` + - `user` - username for WebDAV server, can be empty in case of using `token` authentication. The order in which DVC searches for username: @@ -603,11 +607,11 @@ more information. authentication. ```dvc - $ dvc remote modify myremote --local password mypassword + $ dvc remote modify --local myremote password mypassword ``` -> The username and password (may) contain sensitive user info. Therefore, it's -> safer to add them with the `--local` option, so they're written to a +> The username, password and token (may) contain sensitive user info. Therefore, +> it's safer to add them with the `--local` option, so they're written to a > Git-ignored config file. - `ask_password` - ask each time for the password to use for `user/password` From 127d00e18342f1413008156b59b7f50b6835156f Mon Sep 17 00:00:00 2001 From: Jorge Orpinel Date: Wed, 5 Aug 2020 00:41:08 -0500 Subject: [PATCH 04/10] Update content/docs/command-reference/remote/modify.md --- content/docs/command-reference/remote/modify.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/content/docs/command-reference/remote/modify.md b/content/docs/command-reference/remote/modify.md index efbf8d48ba..5daad80cab 100644 --- a/content/docs/command-reference/remote/modify.md +++ b/content/docs/command-reference/remote/modify.md @@ -610,9 +610,9 @@ more information. $ dvc remote modify --local myremote password mypassword ``` -> The username, password and token (may) contain sensitive user info. Therefore, -> it's safer to add them with the `--local` option, so they're written to a -> Git-ignored config file. +> The username, password, and token (may) contain sensitive user info. +> Therefore, it's safer to add them with the `--local` option, so they're +> written to a Git-ignored config file. - `ask_password` - ask each time for the password to use for `user/password` authentication. From feb10a082785f06d553288d78a60b87249b1f16a Mon Sep 17 00:00:00 2001 From: Jorge Orpinel Date: Wed, 5 Aug 2020 00:41:53 -0500 Subject: [PATCH 05/10] Update content/docs/command-reference/remote/modify.md --- content/docs/command-reference/remote/modify.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/command-reference/remote/modify.md b/content/docs/command-reference/remote/modify.md index 5daad80cab..c5b0be3c06 100644 --- a/content/docs/command-reference/remote/modify.md +++ b/content/docs/command-reference/remote/modify.md @@ -594,7 +594,7 @@ more information. ``` - `user` - username for WebDAV server, can be empty in case of using `token` - authentication. The order in which DVC searches for username: + authentication. The order in which DVC searches for username is: 1. `user` specified in one of the DVC configs; 2. `user` specified in the url (e.g. `webdav://user@example.com/path`) From 49e894d21ea06834e54107cbd6ecd62ecbb2a225 Mon Sep 17 00:00:00 2001 From: Jorge Orpinel Date: Wed, 5 Aug 2020 00:48:07 -0500 Subject: [PATCH 06/10] Update content/docs/command-reference/remote/modify.md --- content/docs/command-reference/remote/modify.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/command-reference/remote/modify.md b/content/docs/command-reference/remote/modify.md index c5b0be3c06..514ea7b1aa 100644 --- a/content/docs/command-reference/remote/modify.md +++ b/content/docs/command-reference/remote/modify.md @@ -637,7 +637,7 @@ more information. $ dvc remote modify myremote key_path /path/to/key ``` -- `timeout` - connection timeout to use for WebDAV. +- `timeout` - connection timeout for WebDAV server. ```dvc $ dvc remote modify myremote timeout timeoutseconds From 4fa3d8bcb8111877b98302bc94dd049fecf2bc44 Mon Sep 17 00:00:00 2001 From: Jorge Orpinel Date: Wed, 5 Aug 2020 00:56:25 -0500 Subject: [PATCH 07/10] Update content/docs/command-reference/remote/modify.md --- content/docs/command-reference/remote/modify.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/command-reference/remote/modify.md b/content/docs/command-reference/remote/modify.md index 514ea7b1aa..5741e4675f 100644 --- a/content/docs/command-reference/remote/modify.md +++ b/content/docs/command-reference/remote/modify.md @@ -637,7 +637,7 @@ more information. $ dvc remote modify myremote key_path /path/to/key ``` -- `timeout` - connection timeout for WebDAV server. +- `timeout` - connection timeout (in seconds) for WebDAV server. ```dvc $ dvc remote modify myremote timeout timeoutseconds From 8f0836cf908f2acb0a4889726ea3d3e6f2ff5b1f Mon Sep 17 00:00:00 2001 From: Christoph Berganski Date: Wed, 5 Aug 2020 14:37:22 +0200 Subject: [PATCH 08/10] Update content/docs/command-reference/remote/modify.md Co-authored-by: Jorge Orpinel --- content/docs/command-reference/remote/modify.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/command-reference/remote/modify.md b/content/docs/command-reference/remote/modify.md index 5741e4675f..a53d08bb10 100644 --- a/content/docs/command-reference/remote/modify.md +++ b/content/docs/command-reference/remote/modify.md @@ -640,7 +640,7 @@ more information. - `timeout` - connection timeout (in seconds) for WebDAV server. ```dvc - $ dvc remote modify myremote timeout timeoutseconds + $ dvc remote modify myremote timeout 120 ``` From b449189a0a8ad75c414f6eb7fcb901875be4be67 Mon Sep 17 00:00:00 2001 From: Christoph Berganski Date: Wed, 5 Aug 2020 14:44:58 +0200 Subject: [PATCH 09/10] Update modify.md --- content/docs/command-reference/remote/modify.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/command-reference/remote/modify.md b/content/docs/command-reference/remote/modify.md index a53d08bb10..c0f5e8988e 100644 --- a/content/docs/command-reference/remote/modify.md +++ b/content/docs/command-reference/remote/modify.md @@ -637,7 +637,7 @@ more information. $ dvc remote modify myremote key_path /path/to/key ``` -- `timeout` - connection timeout (in seconds) for WebDAV server. +- `timeout` - connection timeout (in seconds) for WebDAV server (default: 30 seconds). ```dvc $ dvc remote modify myremote timeout 120 From 3df0fc58b8151dda775f1dec96a2d65820590dd3 Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Wed, 5 Aug 2020 12:45:11 +0000 Subject: [PATCH 10/10] Restyled by prettier --- content/docs/command-reference/remote/modify.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/content/docs/command-reference/remote/modify.md b/content/docs/command-reference/remote/modify.md index c0f5e8988e..00bc54f523 100644 --- a/content/docs/command-reference/remote/modify.md +++ b/content/docs/command-reference/remote/modify.md @@ -637,7 +637,8 @@ more information. $ dvc remote modify myremote key_path /path/to/key ``` -- `timeout` - connection timeout (in seconds) for WebDAV server (default: 30 seconds). +- `timeout` - connection timeout (in seconds) for WebDAV server (default: 30 + seconds). ```dvc $ dvc remote modify myremote timeout 120