Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd: add parameters for configuration of WebDAV remotes #1617

Merged
merged 22 commits into from
Aug 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
a00dd30
cmd: add parameters for configuration of WebDAV remotes
Jul 22, 2020
9864d50
Update content/docs/command-reference/remote/modify.md
jorgeorpinel Jul 23, 2020
6d7eeeb
cmd: add token authentication example to remote modify for WebDAV
Jul 23, 2020
127d00e
Update content/docs/command-reference/remote/modify.md
jorgeorpinel Aug 5, 2020
feb10a0
Update content/docs/command-reference/remote/modify.md
jorgeorpinel Aug 5, 2020
49e894d
Update content/docs/command-reference/remote/modify.md
jorgeorpinel Aug 5, 2020
4fa3d8b
Update content/docs/command-reference/remote/modify.md
jorgeorpinel Aug 5, 2020
8f0836c
Update content/docs/command-reference/remote/modify.md
iksnagreb Aug 5, 2020
b449189
Update modify.md
iksnagreb Aug 5, 2020
84b76dc
Update content/docs/command-reference/remote/modify.md
jorgeorpinel Aug 6, 2020
e70cd5b
Update content/docs/command-reference/remote/add.md
iksnagreb Aug 6, 2020
b76cec5
cmd: add explanation of WebDAV API location to 'remote add' command
Aug 6, 2020
b413b0e
cmd: clarify user/password, token and ask_password relation for WebDAV
iksnagreb Aug 6, 2020
2f72006
cmd: add ' quotes to token as it might contain special characters
iksnagreb Aug 6, 2020
d870b34
cmd: move 'user' order explanation after the example as suggested
iksnagreb Aug 6, 2020
31bccb5
cmd: add more explanation to WebDAV certificates parameters
iksnagreb Aug 6, 2020
098fe82
cmd: add 'url' parameter explanations to 'remote' modify for WebDAV
iksnagreb Aug 6, 2020
5eca211
Update content/docs/command-reference/remote/modify.md
jorgeorpinel Aug 6, 2020
5d3b9ec
Update content/docs/command-reference/remote/modify.md
jorgeorpinel Aug 6, 2020
99c7b8d
Update content/docs/command-reference/remote/modify.md
jorgeorpinel Aug 6, 2020
0dbbb27
Update content/docs/command-reference/remote/modify.md
jorgeorpinel Aug 6, 2020
08f888f
Update content/docs/command-reference/remote/modify.md
jorgeorpinel Aug 6, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions content/docs/command-reference/remote/add.md
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,21 @@ $ dvc remote add -d myremote https://example.com/path/to/dir

<details>

### Click for WebDAV

```dvc
$ dvc remote add -d myremote webdavs://example.com/public.php/webdav
```
Comment on lines +349 to +351
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We just realized that PHP is kind of a weird example to have (see #1695 (review)).

We'll be reviewing these sample URLs in #1706, in case you're interested @iksnagreb 🙂


> See also `dvc remote modify` for a full list of WebDAV parameters.

> Note that the location of the WebDAV API endpoint `/public.php/webdav` might
> be different for your server.

</details>

<details>

### Click for local remote

A "local remote" is a directory in the machine's file system.
Expand Down
88 changes: 88 additions & 0 deletions content/docs/command-reference/remote/modify.md
Original file line number Diff line number Diff line change
Expand Up @@ -582,6 +582,94 @@ more information.

</details>

<details>

### Click for WebDAV

- `url` - remote location URL.

```dvc
$ dvc remote modify myremote \
url webdavs://example.com/public.php/webdav
```

> Note that the location of the WebDAV API endpoint `/public.php/webdav` might
> be different for your server.

If your remote is located in a subfolder of your WebDAV server e.g.
`/path/to/dir`, this may be appended to the general `url`:

```dvc
$ dvc remote modify myremote \
url webdavs://example.com/public.php/webdav/path/to/dir
```

- `token` - token for WebDAV server, can be empty in case of using
`user/password` authentication.
jorgeorpinel marked this conversation as resolved.
Show resolved Hide resolved

```dvc
$ dvc remote modify --local myremote token '<mytoken>'
```

- `user` - username for WebDAV server, can be empty in case of using `token`
authentication.

```dvc
$ dvc remote modify --local myremote user myuser
```

The order in which DVC searches for username is:

1. `user` parameter set with this command (found in `.dvc/config`);
2. User defined in the URL (e.g. `webdav://[email protected]/path`)

- `password` - password for WebDAV server, can be empty in case of using `token`
authentication.

```dvc
$ 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.

> Note that `user/password` and `token` authentication are incompatible. You
> should authenticate against yout WebDAV remote by either `user/password` or
> `token`.

- `ask_password` - ask each time for the password to use for `user/password`
authentication. This has no effect if `password` or `token` are set.

```dvc
$ dvc remote modify myremote ask_password true
```

- `cert_path` - path to certificate used for WebDAV server authentication, if
you need to use local client side certificates.

```dvc
$ dvc remote modify myremote cert_path /path/to/cert
```

- `key_path` - path to private key to use to access a remote. Only has an
effect in combination with `cert_path`.

```dvc
$ dvc remote modify myremote key_path /path/to/key
```

> Note that the certificate in `cert_path` might already contain the private
> key.

- `timeout` - connection timeout (in seconds) for WebDAV server (default: 30).

```dvc
$ dvc remote modify myremote timeout 120
```

</details>

## Example: Customize an S3 remote

Let's first set up a _default_ S3 remote.
Expand Down