From 672666691a8c6bed849b3d18eb0ed71fdff264d4 Mon Sep 17 00:00:00 2001 From: Niki Dobrev Date: Mon, 9 Nov 2020 10:53:10 +0200 Subject: [PATCH 01/16] Fix CPU hogging when running in background. (#36) Fixes #35 --- .../java/org/cryptomator/cli/CryptomatorCli.java | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/cryptomator/cli/CryptomatorCli.java b/src/main/java/org/cryptomator/cli/CryptomatorCli.java index d2cc903..62f9c8c 100644 --- a/src/main/java/org/cryptomator/cli/CryptomatorCli.java +++ b/src/main/java/org/cryptomator/cli/CryptomatorCli.java @@ -116,12 +116,18 @@ private static Optional initWebDavServer(Args args) { private static void waitForShutdown(Runnable runnable) { Runtime.getRuntime().addShutdownHook(new Thread(runnable)); LOG.info("Press Ctrl+C to terminate."); + + // Block the main thread infinitely as otherwise when using + // Fuse mounts the application quits immediately. try { - while (true) { - System.in.read(); + Object mainThreadBlockLock = new Object(); + synchronized (mainThreadBlockLock) { + while (true) { + mainThreadBlockLock.wait(); + } } - } catch (IOException e) { - e.printStackTrace(); + } catch (Exception e) { + LOG.error("Main thread blocking failed."); } } } From 3c5fab4d3164097aa8b45b734f7f7cf2b5d6eaf5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20PIREZ?= Date: Mon, 12 Apr 2021 16:22:33 +0800 Subject: [PATCH 02/16] Fixing docker parameters order --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c37ee3a..ef526a4 100644 --- a/README.md +++ b/README.md @@ -83,8 +83,8 @@ docker run --rm -p 8080:8080 \ -v /path/to/vault:/vaults/vault \ -v /path/to/differentVault:/vaults/differentVault \ -v /path/to/fileWithPassword:/passwordFile \ - --bind 0.0.0.0 --port 8080 \ cryptomator/cli \ + --bind 0.0.0.0 --port 8080 \ --vault demoVault=/vaults/vault --password demoVault=topSecret \ --vault otherVault=/vaults/differentVault --passwordfile otherVault=/passwordFile # you can now mount http://localhost:8080/demoVault/ @@ -97,8 +97,8 @@ docker run --rm --network=host \ -v /path/to/vault:/vaults/vault \ -v /path/to/differentVault:/vaults/differentVault \ -v /path/to/fileWithPassword:/passwordFile \ - --bind 127.0.0.1 --port 8080 \ cryptomator/cli \ + --bind 127.0.0.1 --port 8080 \ --vault demoVault=/vaults/vault --password demoVault=topSecret \ --vault otherVault=/vaults/differentVault --passwordfile otherVault=/passwordFile # you can now mount http://localhost:8080/demoVault/ From d014c240fba620a7ae28ab4413d1de609b2fe7f4 Mon Sep 17 00:00:00 2001 From: Tobias Hagemann Date: Mon, 12 Apr 2021 10:51:16 +0200 Subject: [PATCH 03/16] Fixed CI build by replacing deprecated `set_env` command --- .github/workflows/build.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a7e85a2..a02ac62 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -31,8 +31,7 @@ jobs: id: setversion run: | v=$(mvn help:evaluate "-Dexpression=project.version" -q -DforceStdout) - echo "::set-env name=BUILD_VERSION::${v}" - echo "::set-output name=version::${v}" + echo "BUILD_VERSION=${v}" >> $GITHUB_ENV - name: Build and Test run: mvn -B install - name: Upload snapshot artifact cryptomator-cli-${{ env.BUILD_VERSION }}.jar From 1be757682c8d896c7e0dcb773beeb350a7c4272c Mon Sep 17 00:00:00 2001 From: Julian G Date: Thu, 16 Dec 2021 03:29:03 +0100 Subject: [PATCH 04/16] support vault format 8 update cryptofs update README.md update build.yml to java 17 --- .github/workflows/build.yml | 2 +- README.md | 6 ++--- pom.xml | 4 ++-- .../org/cryptomator/cli/CryptomatorCli.java | 23 ++++++++++++++++++- 4 files changed, 28 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a02ac62..9cceacd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,7 +17,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-java@v1 with: - java-version: 14 + java-version: 17 - uses: actions/cache@v1 with: path: ~/.m2/repository diff --git a/README.md b/README.md index ef526a4..06c235a 100644 --- a/README.md +++ b/README.md @@ -3,9 +3,9 @@ # Cryptomator CLI -This is a minimal command-line program that unlocks vaults of vault format 7. +This is a minimal command-line program that unlocks vaults of vault format 8. After the unlock the vault content can then be accessed via an embedded WebDAV server. -The minium required Java version is JDK 11. +The minium required Java version is JDK 17. ## Disclaimer @@ -15,7 +15,7 @@ This project is in an early stage and not ready for production use. We recommend Download the jar file via [GitHub Releases](https://github.com/cryptomator/cli/releases). -Cryptomator CLI requires that at least JDK 11 is present on your system. +Cryptomator CLI requires that at least JDK 17 is present on your system. ```sh java -jar cryptomator-cli-x.y.z.jar \ diff --git a/pom.xml b/pom.xml index 6b4d59e..85c7c65 100644 --- a/pom.xml +++ b/pom.xml @@ -8,13 +8,13 @@ https://github.com/cryptomator/cli - 1.9.10 + 2.3.0 1.0.11 1.4 1.2.3 1.2.4 - 11 + 17 UTF-8 diff --git a/src/main/java/org/cryptomator/cli/CryptomatorCli.java b/src/main/java/org/cryptomator/cli/CryptomatorCli.java index 62f9c8c..ed2fc48 100644 --- a/src/main/java/org/cryptomator/cli/CryptomatorCli.java +++ b/src/main/java/org/cryptomator/cli/CryptomatorCli.java @@ -15,13 +15,17 @@ import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; +import java.security.NoSuchAlgorithmException; +import java.security.SecureRandom; import java.util.ArrayList; import java.util.Optional; import java.util.Set; +import com.google.common.base.Preconditions; import org.apache.commons.cli.ParseException; import org.cryptomator.cryptofs.CryptoFileSystemProperties; import org.cryptomator.cryptofs.CryptoFileSystemProvider; +import org.cryptomator.cryptolib.common.MasterkeyFileAccess; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -29,6 +33,9 @@ public class CryptomatorCli { private static final Logger LOG = LoggerFactory.getLogger(CryptomatorCli.class); + private static final byte[] PEPPER = new byte[0]; + private static final String SCHEME = "masterkeyfile"; + public static void main(String[] rawArgs) throws IOException { try { Args args = Args.parse(rawArgs); @@ -71,12 +78,26 @@ private static void startup(Args args) throws IOException { Optional server = initWebDavServer(args); ArrayList mounts = new ArrayList<>(); + SecureRandom secureRandom; + try { + secureRandom = SecureRandom.getInstanceStrong(); + } catch (NoSuchAlgorithmException e) { + throw new IllegalStateException("A strong algorithm must exist in every Java platform.", e); + } + MasterkeyFileAccess masterkeyFileAccess = new MasterkeyFileAccess(PEPPER, secureRandom); + for (String vaultName : args.getVaultNames()) { Path vaultPath = Paths.get(args.getVaultPath(vaultName)); LOG.info("Unlocking vault \"{}\" located at {}", vaultName, vaultPath); String vaultPassword = args.getPasswordStrategy(vaultName).password(); CryptoFileSystemProperties properties = CryptoFileSystemProperties.cryptoFileSystemProperties() - .withPassphrase(vaultPassword).build(); + .withKeyLoader(keyId -> { + Preconditions.checkArgument(SCHEME.equalsIgnoreCase(keyId.getScheme()), "Only supports keys with scheme " + SCHEME); + Path keyFilePath = vaultPath.resolve(keyId.getSchemeSpecificPart()); + return masterkeyFileAccess.load(keyFilePath, vaultPassword); + }) + .build(); + Path vaultRoot = CryptoFileSystemProvider.newFileSystem(vaultPath, properties).getPath("/"); Path fuseMountPoint = args.getFuseMountPoint(vaultName); From aed3f51a76435eadfd31cb571e999895ff98f3a9 Mon Sep 17 00:00:00 2001 From: Polzin <58709258+being-peace@users.noreply.github.com> Date: Tue, 24 Aug 2021 09:59:28 +0200 Subject: [PATCH 05/16] Update README.md Include some findings about passwords in commandline and mount options --- README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 06c235a..5b5c5ae 100644 --- a/README.md +++ b/README.md @@ -21,8 +21,11 @@ Cryptomator CLI requires that at least JDK 17 is present on your system. java -jar cryptomator-cli-x.y.z.jar \ --vault demoVault=/path/to/vault --password demoVault=topSecret \ --vault otherVault=/path/to/differentVault --passwordfile otherVault=/path/to/fileWithPassword \ + --vault thirdVault=/path/to/thirdVault \ --bind 127.0.0.1 --port 8080 -# you can now mount http://localhost:8080/demoVault/ +# You can now mount http://localhost:8080/demoVault/, +# The password for the thirdVault is read from stdin. +# Be aware that passing the password on the commandline typically makes it visible to anyone on your system! ``` ## Filesystem integration @@ -45,7 +48,8 @@ sudo mkdir /media/your/mounted/folder Then you can mount the vault ```sh -sudo mount -t davfs http://localhost:8080/demoVault/ /media/your/mounted/folder +echo | sudo mount -t davfs -o username=,user,gid=1000,uid=1000 http://localhost:8080/demoVault/ /media/your/mounted/folder +# Replace gid/uid with your gid/uid. The echo is used to skip over the password query from davfs ``` To unmount the vault, run From ea661b2e274ad53dc30d09c41529a96577e8bf03 Mon Sep 17 00:00:00 2001 From: Tobias Hagemann Date: Mon, 20 Dec 2021 11:55:21 +0100 Subject: [PATCH 06/16] preparing 0.5.0 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 85c7c65..50e4c4b 100644 --- a/pom.xml +++ b/pom.xml @@ -2,7 +2,7 @@ 4.0.0 org.cryptomator cli - 0.5.0-SNAPSHOT + 0.5.0 Cryptomator CLI Command line program to access encrypted files via WebDAV. https://github.com/cryptomator/cli From 9d67cce758daef7b5ab320702fef314206ccf076 Mon Sep 17 00:00:00 2001 From: Tobias Hagemann Date: Mon, 20 Dec 2021 12:21:43 +0100 Subject: [PATCH 07/16] updated dependencies --- pom.xml | 10 +++++----- .../java/org/cryptomator/cli/frontend/FuseMount.java | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/pom.xml b/pom.xml index 50e4c4b..e4755a2 100644 --- a/pom.xml +++ b/pom.xml @@ -8,11 +8,11 @@ https://github.com/cryptomator/cli - 2.3.0 - 1.0.11 - 1.4 - 1.2.3 - 1.2.4 + 2.3.1 + 1.2.6 + 1.5.0 + 1.2.9 + 1.3.3 17 UTF-8 diff --git a/src/main/java/org/cryptomator/cli/frontend/FuseMount.java b/src/main/java/org/cryptomator/cli/frontend/FuseMount.java index 976085d..90ed7eb 100644 --- a/src/main/java/org/cryptomator/cli/frontend/FuseMount.java +++ b/src/main/java/org/cryptomator/cli/frontend/FuseMount.java @@ -1,15 +1,15 @@ package org.cryptomator.cli.frontend; -import java.nio.file.Path; - -import org.cryptomator.frontend.fuse.mount.CommandFailedException; import org.cryptomator.frontend.fuse.mount.EnvironmentVariables; +import org.cryptomator.frontend.fuse.mount.FuseMountException; import org.cryptomator.frontend.fuse.mount.FuseMountFactory; import org.cryptomator.frontend.fuse.mount.Mount; import org.cryptomator.frontend.fuse.mount.Mounter; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import java.nio.file.Path; + public class FuseMount { private static final Logger LOG = LoggerFactory.getLogger(FuseMount.class); @@ -35,7 +35,7 @@ public boolean mount() { .withMountPoint(mountPoint).build(); mnt = mounter.mount(vaultRoot, envVars); LOG.info("Mounted to {}", mountPoint); - } catch (CommandFailedException e) { + } catch (FuseMountException e) { LOG.error("Can't mount: {}, error: {}", mountPoint, e.getMessage()); return false; } @@ -46,7 +46,7 @@ public void unmount() { try { mnt.unmount(); LOG.info("Unmounted {}", mountPoint); - } catch (CommandFailedException e) { + } catch (FuseMountException e) { LOG.error("Can't unmount gracefully: {}. Force unmount.", e.getMessage()); forceUnmount(); } @@ -56,7 +56,7 @@ private void forceUnmount() { try { mnt.unmountForced(); LOG.info("Unmounted {}", mountPoint); - } catch (CommandFailedException e) { + } catch (FuseMountException e) { LOG.error("Force unmount failed: {}", e.getMessage()); } } From c6e40a37305884a915163eccc96d46a69bc37e8e Mon Sep 17 00:00:00 2001 From: Tobias Hagemann Date: Mon, 20 Dec 2021 12:21:57 +0100 Subject: [PATCH 08/16] updated README [ci skip] --- README.md | 52 +++++++++++++++++++++++++++------------------------- 1 file changed, 27 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index 5b5c5ae..16c08c2 100644 --- a/README.md +++ b/README.md @@ -3,17 +3,17 @@ # Cryptomator CLI -This is a minimal command-line program that unlocks vaults of vault format 8. -After the unlock the vault content can then be accessed via an embedded WebDAV server. -The minium required Java version is JDK 17. +This is a minimal command-line application that unlocks vaults of vault format 8. +After unlocking the vaults, its vault content can be accessed via an embedded WebDAV server. +The minimum required Java version is JDK 17. ## Disclaimer -This project is in an early stage and not ready for production use. We recommend to use it only for testing and evaluation purposes. +:warning: This project is in an early stage and not ready for production use. We recommend using it only for testing and evaluation purposes. ## Download and Usage -Download the jar file via [GitHub Releases](https://github.com/cryptomator/cli/releases). +Download the JAR file via [GitHub Releases](https://github.com/cryptomator/cli/releases). Cryptomator CLI requires that at least JDK 17 is present on your system. @@ -23,36 +23,39 @@ java -jar cryptomator-cli-x.y.z.jar \ --vault otherVault=/path/to/differentVault --passwordfile otherVault=/path/to/fileWithPassword \ --vault thirdVault=/path/to/thirdVault \ --bind 127.0.0.1 --port 8080 -# You can now mount http://localhost:8080/demoVault/, -# The password for the thirdVault is read from stdin. -# Be aware that passing the password on the commandline typically makes it visible to anyone on your system! +# You can now mount http://localhost:8080/demoVault/ +# The password for the third vault is read from stdin +# Be aware that passing the password on the command-line typically makes it visible to anyone on your system! ``` -## Filesystem integration +## Filesystem Integration -Once the vault is unlocked and the webserver started, you can access the vault by any webdav client or directly mounting it in your filesystem. +Once the vault is unlocked and the WebDAV server started, you can access the vault by any WebDAV client or directly mounting it in your filesystem. -### Windows via the Windows Explorer GUI +### Windows via Windows Explorer Open the File Explorer, right click on "This PC" and click on the menu item "Map network drive...". -In the window opening up, select a free drive letter as the mounting point, enter in the Folder text box the url logged by the cli application to the terminal window and click the "Finish" button. + +1. In the Drive list, select a drive letter. (Any available letter will do.) +2. In the Folder box, enter the URL logged by the Cryptomator CLI application. +3. Select Finish. ### Linux via davfs2 -First, you need to create a mount point for your vault +First, you need to create a mount point for your vault: ```sh sudo mkdir /media/your/mounted/folder ``` -Then you can mount the vault +Then you can mount the vault: ```sh echo | sudo mount -t davfs -o username=,user,gid=1000,uid=1000 http://localhost:8080/demoVault/ /media/your/mounted/folder # Replace gid/uid with your gid/uid. The echo is used to skip over the password query from davfs ``` -To unmount the vault, run +To unmount the vault, run: ```sh sudo umount /media/your/mounted/folder @@ -60,27 +63,27 @@ sudo umount /media/your/mounted/folder ### macOS via AppleScript -Mount the vault with +Mount the vault with: ```sh osascript -e 'mount volume "http://localhost:8080/demoVault/"' ``` -Unmount the vault with +Unmount the vault with: ```sh osascript -e 'tell application "Finder" to if "demoVault" exists then eject "demoVault"' ``` -## Using as a docker image +## Using as a Docker image -### Bridge networking with port forward: +### Bridge Network with Port Forwarding :warning: **WARNING: This approach should only be used to test the containerized approach, not in production.** :warning: -The reason is that with port forwarding you need to listen on all interfaces, and potencially other devices on the network could also access your WebDAV server exposing your secret files. +The reason is that with port forwarding, you need to listen on all interfaces. Other devices on the network could also access your WebDAV server and potentially expose your secret files. -Ideally you would run this in a private docker network with trusted containers built by yourself communicating with each other. **Again, the below example is for testing purposes only to understand how the container would behave in production.** +Ideally, you would run this in a private Docker network with trusted containers built by yourself communicating with each other. **Again, the below example is for testing purposes only to understand how the container would behave in production.** ```sh docker run --rm -p 8080:8080 \ @@ -91,10 +94,10 @@ docker run --rm -p 8080:8080 \ --bind 0.0.0.0 --port 8080 \ --vault demoVault=/vaults/vault --password demoVault=topSecret \ --vault otherVault=/vaults/differentVault --passwordfile otherVault=/passwordFile -# you can now mount http://localhost:8080/demoVault/ +# You can now mount http://localhost:8080/demoVault/ ``` -### Host networking: +### Host Network ```sh docker run --rm --network=host \ @@ -105,12 +108,11 @@ docker run --rm --network=host \ --bind 127.0.0.1 --port 8080 \ --vault demoVault=/vaults/vault --password demoVault=topSecret \ --vault otherVault=/vaults/differentVault --passwordfile otherVault=/passwordFile -# you can now mount http://localhost:8080/demoVault/ +# You can now mount http://localhost:8080/demoVault/ ``` Then you can access the vault using any WebDAV client. - ## License This project is dual-licensed under the AGPLv3 for FOSS projects as well as a commercial license derived from the LGPL for independent software vendors and resellers. If you want to use this library in applications, that are *not* licensed under the AGPL, feel free to contact our [support team](https://cryptomator.org/help/). From 079521dab552569b3305bf6635bc2438c5d130c0 Mon Sep 17 00:00:00 2001 From: Tobias Hagemann Date: Mon, 20 Dec 2021 12:34:28 +0100 Subject: [PATCH 09/16] trying to fix release build --- .github/workflows/build.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9cceacd..ab956bc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,7 +10,7 @@ jobs: #This check is case insensitive if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')" outputs: - artifact-version: ${{ steps.setversion.outputs.version }} + artifactVersion: ${{ steps.setversion.outputs.version }} env: BUILD_VERSION: SNAPSHOT steps: @@ -49,7 +49,7 @@ jobs: - name: Download cryptomator-cli.jar uses: actions/download-artifact@v1 with: - name: cryptomator-cli-${{ needs.build.outputs.artifact-version }}.jar + name: cryptomator-cli-${{ needs.build.outputs.artifactVersion }}.jar path: . - name: Create Release id: create_release @@ -63,12 +63,12 @@ jobs: :construction: Work in Progress draft: true prerelease: false - - name: Upload cryptomator-cli-${{ needs.build.outputs.artifact-version }}.jar to GitHub Releases + - name: Upload cryptomator-cli-${{ needs.build.outputs.artifactVersion }}.jar to GitHub Releases uses: actions/upload-release-asset@v1.0.1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: cryptomator-cli-${{ needs.build.outputs.artifact-version }}.jar - asset_name: cryptomator-cli-${{ needs.build.outputs.artifact-version }}.jar + asset_path: cryptomator-cli-${{ needs.build.outputs.artifactVersion }}.jar + asset_name: cryptomator-cli-${{ needs.build.outputs.artifactVersion }}.jar asset_content_type: application/jar From 81ec0f22af58ca5f9a3f6014dc470f81602f99c5 Mon Sep 17 00:00:00 2001 From: Tobias Hagemann Date: Mon, 20 Dec 2021 12:42:06 +0100 Subject: [PATCH 10/16] trying to fix release build --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ab956bc..8d97c62 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -32,6 +32,7 @@ jobs: run: | v=$(mvn help:evaluate "-Dexpression=project.version" -q -DforceStdout) echo "BUILD_VERSION=${v}" >> $GITHUB_ENV + echo "::set-output name=artifactVersion::${BUILD_VERSION}" - name: Build and Test run: mvn -B install - name: Upload snapshot artifact cryptomator-cli-${{ env.BUILD_VERSION }}.jar From 2c2a9bf67648b31e7efe5dda3940d1e169daae4b Mon Sep 17 00:00:00 2001 From: Tobias Hagemann Date: Mon, 20 Dec 2021 12:47:17 +0100 Subject: [PATCH 11/16] trying to fix release build --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8d97c62..4d7a465 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -30,8 +30,8 @@ jobs: - name: Export the project version to the job environment and fix it as an ouput of this job id: setversion run: | - v=$(mvn help:evaluate "-Dexpression=project.version" -q -DforceStdout) - echo "BUILD_VERSION=${v}" >> $GITHUB_ENV + BUILD_VERSION=$(mvn help:evaluate "-Dexpression=project.version" -q -DforceStdout) + echo "${BUILD_VERSION}" >> $GITHUB_ENV echo "::set-output name=artifactVersion::${BUILD_VERSION}" - name: Build and Test run: mvn -B install From 1e6a8653a27d4775dd228272e6e543f77425d6b7 Mon Sep 17 00:00:00 2001 From: Tobias Hagemann Date: Mon, 20 Dec 2021 12:49:59 +0100 Subject: [PATCH 12/16] trying to fix release build --- .github/workflows/build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4d7a465..a6fbedd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -30,9 +30,9 @@ jobs: - name: Export the project version to the job environment and fix it as an ouput of this job id: setversion run: | - BUILD_VERSION=$(mvn help:evaluate "-Dexpression=project.version" -q -DforceStdout) - echo "${BUILD_VERSION}" >> $GITHUB_ENV - echo "::set-output name=artifactVersion::${BUILD_VERSION}" + v=$(mvn help:evaluate "-Dexpression=project.version" -q -DforceStdout) + echo "BUILD_VERSION=${v}" >> $GITHUB_ENV + echo "::set-output name=artifactVersion::${env.BUILD_VERSION}" - name: Build and Test run: mvn -B install - name: Upload snapshot artifact cryptomator-cli-${{ env.BUILD_VERSION }}.jar From 52693aa4f2c79bddfbd8bd983324c4e48c086fe1 Mon Sep 17 00:00:00 2001 From: Tobias Hagemann Date: Mon, 20 Dec 2021 12:59:45 +0100 Subject: [PATCH 13/16] trying to fix release build --- .github/workflows/build.yml | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a6fbedd..d18276a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,8 +11,6 @@ jobs: if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')" outputs: artifactVersion: ${{ steps.setversion.outputs.version }} - env: - BUILD_VERSION: SNAPSHOT steps: - uses: actions/checkout@v2 - uses: actions/setup-java@v1 @@ -27,18 +25,17 @@ jobs: - name: Ensure to use tagged version run: mvn versions:set --file ./pom.xml -DnewVersion=${GITHUB_REF##*/} # use shell parameter expansion to strip of 'refs/tags' if: startsWith(github.ref, 'refs/tags/') - - name: Export the project version to the job environment and fix it as an ouput of this job + - name: Output project version id: setversion run: | - v=$(mvn help:evaluate "-Dexpression=project.version" -q -DforceStdout) - echo "BUILD_VERSION=${v}" >> $GITHUB_ENV - echo "::set-output name=artifactVersion::${env.BUILD_VERSION}" + BUILD_VERSION=$(mvn help:evaluate "-Dexpression=project.version" -q -DforceStdout) + echo "::set-output name=version::${BUILD_VERSION}" - name: Build and Test run: mvn -B install - - name: Upload snapshot artifact cryptomator-cli-${{ env.BUILD_VERSION }}.jar + - name: Upload artifact cryptomator-cli-{{ steps.setversion.outputs.version }}.jar uses: actions/upload-artifact@v2 with: - name: cryptomator-cli-${{ env.BUILD_VERSION }}.jar + name: cryptomator-cli-${{ steps.setversion.outputs.version }}.jar path: target/cryptomator-cli-*.jar release: From 5369d4d019d1a1e726a9beec60cacabbee10b37f Mon Sep 17 00:00:00 2001 From: Tobias Hagemann Date: Mon, 20 Dec 2021 13:01:54 +0100 Subject: [PATCH 14/16] trying to fix release build --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d18276a..27b3f3e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -32,7 +32,7 @@ jobs: echo "::set-output name=version::${BUILD_VERSION}" - name: Build and Test run: mvn -B install - - name: Upload artifact cryptomator-cli-{{ steps.setversion.outputs.version }}.jar + - name: Upload artifact cryptomator-cli-${{ steps.setversion.outputs.version }}.jar uses: actions/upload-artifact@v2 with: name: cryptomator-cli-${{ steps.setversion.outputs.version }}.jar From 10f53041cef4de2a8e9e528d2af4ee88351ee82a Mon Sep 17 00:00:00 2001 From: Sebastian Stenzel Date: Tue, 21 Dec 2021 14:58:32 +0100 Subject: [PATCH 15/16] fixes #48 --- src/main/java/org/cryptomator/cli/frontend/FuseMount.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/cryptomator/cli/frontend/FuseMount.java b/src/main/java/org/cryptomator/cli/frontend/FuseMount.java index 90ed7eb..40ca15a 100644 --- a/src/main/java/org/cryptomator/cli/frontend/FuseMount.java +++ b/src/main/java/org/cryptomator/cli/frontend/FuseMount.java @@ -31,7 +31,9 @@ public boolean mount() { try { Mounter mounter = FuseMountFactory.getMounter(); - EnvironmentVariables envVars = EnvironmentVariables.create().withFlags(mounter.defaultMountFlags()) + EnvironmentVariables envVars = EnvironmentVariables.create() // + .withFlags(mounter.defaultMountFlags()) // + .withFileNameTranscoder(mounter.defaultFileNameTranscoder()) // .withMountPoint(mountPoint).build(); mnt = mounter.mount(vaultRoot, envVars); LOG.info("Mounted to {}", mountPoint); From 8c42381754415307cfa1654a8443226537182c76 Mon Sep 17 00:00:00 2001 From: Sebastian Stenzel Date: Tue, 21 Dec 2021 14:59:32 +0100 Subject: [PATCH 16/16] preparing 0.5.1 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1367dea..2efc757 100644 --- a/pom.xml +++ b/pom.xml @@ -2,7 +2,7 @@ 4.0.0 org.cryptomator cli - 0.6.0-SNAPSHOT + 0.5.1 Cryptomator CLI Command line program to access encrypted files via WebDAV. https://github.com/cryptomator/cli