Updated the KB to include the use of a containerized client

This commit is contained in:
Michele Cereda
2022-09-18 10:48:41 +02:00
parent 42126e0873
commit c833a4515f
2 changed files with 52 additions and 10 deletions

View File

@@ -21,24 +21,37 @@ KEYBASE_USERNAME='user' KEYBASE_PAPERKEY='paper key' keybase oneshot
keybase git list
# Run garbage collection on git repository.
keybase git gc awesomerepo
keybase git gc 'awesomerepo'
# Enable LFS support for a repository.
# Run it from the repository's root.
keybase git lfs-config
# Clone a repository with LFS-enabled files.
git clone --no-checkout keybase://private/user/repo \
&& cd repo && keybase git lfs-config && cd - \
&& git -C repo checkout -f HEAD
git clone --no-checkout 'keybase://private/user/repo' \
&& cd 'repo' && keybase git lfs-config && cd - \
&& git -C 'repo' checkout -f HEAD
# Import an existing repository in Keybase
keybase git create repo \
&& git clone --mirror https://github.com/user/repo /tmp/repo.git \
&& git -C /tmp/repo.git push --mirror keybase://private/user/repo
keybase git create 'repo' \
&& git clone --mirror 'https://github.com/user/repo' '/tmp/repo.git' \
&& git -C '/tmp/repo.git' push --mirror 'keybase://private/user/repo'
# Run as root.
KEYBASE_ALLOW_ROOT=1 keybase oneshot
KEYBASE_ALLOW_ROOT='1' keybase oneshot
# Run the service in a container.
podman run -d --rm --name 'keybase' \
-e KEYBASE_SERVICE='1' \
-e KEYBASE_USERNAME='user' \
-e KEYBASE_PAPERKEY='paper key …' \
'keybaseio/client:stable'
# Execute commands using the containerized service.
podman exec \
--user keybase \
keybase \
keybase whoami
```
## Service execution
@@ -94,10 +107,10 @@ Use `keybase oneshot` to establish a temporary device. The resulting process won
keybase oneshot
# Use flags.
keybase oneshot --username user --paperkey "paper key"
keybase oneshot --username user --paperkey 'paper key'
# Use environment variables
KEYBASE_PAPERKEY="paper key" KEYBASE_USERNAME="user" keybase oneshot
KEYBASE_PAPERKEY='paper key' KEYBASE_USERNAME='user' keybase oneshot
```
Exploding messages work in oneshot mode with the caveat that you cannot run multiple instances of such with the same paperkey at the same time as each instance will try to create ephemeral keys, but require a distinct paperkey to uniquely identify itself as a separate device.

View File

@@ -125,8 +125,37 @@ sudo docker run --privileged \
"/volume1/Data" "/volume1/@sharesnap/Data"
```
## Use keybase
Just use a containerized service and execute commands with it:
```sh
# Run the service.
docker run -d --name 'keybase' \
-e KEYBASE_SERVICE='1' \
-e KEYBASE_USERNAME='user' \
-e KEYBASE_PAPERKEY='paper key' \
'keybaseio/client:stable'
# Execute commands using the containerized service.
docker exec \
--user keybase \
keybase \
keybase whoami
```
### Manage git repositories with a containerized keybase instance
See the [readme for michelecereda/keybaseio-client][michelecereda/keybaseio-client].
## Further readings
## Sources
- [Configuring deduplication block on the Synology]
<!-- internal references -->
[michelecereda/keybaseio-client]: ../docker/keybaseio-client/README.md
<!-- external references -->
[configuring deduplication block on the synology]: https://onedrive.live.com/?authkey=%21ACYMJq62iJaU7HY&cid=1E8D74207941B8DD&id=1E8D74207941B8DD%21243&parId=1E8D74207941B8DD%21121&o=OneUp