Skip to content

[stable-34.0] Feature/config not interactive migrated to nextcloud cmd - #10608

Merged
mgallien merged 6 commits into
stable-34.0from
backport/10468/stable-34.0
Aug 17, 2026
Merged

[stable-34.0] Feature/config not interactive migrated to nextcloud cmd#10608
mgallien merged 6 commits into
stable-34.0from
backport/10468/stable-34.0

Conversation

@backportbot

@backportbot backportbot Bot commented Aug 14, 2026

Copy link
Copy Markdown

Backport of #10468

Warning, This backport's changes differ from the original and might be incomplete ⚠️

Todo

  • Review and resolve any conflicts
  • Review and verify the backported changes
  • Amend HEAD commit to remove the line stating to skip CI

Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

@backportbot
backportbot Bot requested review from Rello and mgallien August 14, 2026 07:07
@backportbot backportbot Bot added this to the 34.0.2 milestone Aug 14, 2026
@mgallien
mgallien force-pushed the backport/10468/stable-34.0 branch from c97721e to 188941e Compare August 14, 2026 08:13
@mgallien
mgallien marked this pull request as ready for review August 14, 2026 08:15
@mgallien
mgallien enabled auto-merge August 14, 2026 08:16
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
Image 65.1% Coverage on New Code (required ≥ 80%)
Image 21 New Code Smells (required ≤ 0)

See analysis details on SonarQube Cloud

Image Catch issues before they fail your Quality Gate with our IDE extension Image SonarQube for IDE

FolderMan access to a somehow singleton was awkward

make it behaves a bt more like a common singleton but also enables it to
be reset when needed for automated tests

will enable access ot it from nextcloducmd

while doing that discover and fix access to private members of FolderMan
from unexpected places

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
will make code smaller and faster

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
Ports the non-interactive account provisioning feature from the GUI
client to nextcloudcmd. When --userid, --apppassword, and --serverurl
are provided, nextcloudcmd validates the credentials against the server,
creates the local sync folder if --localdirpath is given, writes the
account and folder configuration to disk (in the same format read by
the GUI client), and stores the password in the system keychain.

Progress and errors are reported on stdout/stderr and the process exits
with 0 on success or 1 on failure.

New flags: --userid, --apppassword, --serverurl, --localdirpath,
--remotedirpath, --isvfsenabled, --confdir.

nextcloudcmd links against nextcloudCore to gain access to
AccountSetupCommandLineManager, AccountSetupFromCommandLineJob and
FolderMan (which must be instantiated before setupAccountFromCommandLine
is called so the singleton is available).

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
Assisted-by: ClaudeCode:claude-sonnet-4-6
teh executable return code should be 0 in case it worked and non 0 for
error cases

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
if the server signals that login is needed, teh account state may be
swithed to "signed out"

ensure this is followed by a login proces during which the user has to
provide credentials

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
@mgallien
mgallien force-pushed the backport/10468/stable-34.0 branch from 188941e to 9010525 Compare August 17, 2026 07:16
@github-actions

Copy link
Copy Markdown
Contributor

Artifact containing the AppImage: nextcloud-appimage-pr-10608.zip

Digest: sha256:af9ed279e29b899a875741f696a9cc2779698e0cfc6d1c28d0486d92ba2b5674

To test this change/fix you can download the above artifact file, unzip it, and run it.

Please make sure to quit your existing Nextcloud app and backup your data.

@mgallien
mgallien merged commit 728785f into stable-34.0 Aug 17, 2026
16 of 18 checks passed
@mgallien
mgallien deleted the backport/10468/stable-34.0 branch August 17, 2026 07:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants