Skip to content

adds ability to specify user and password via env variables - #8490

Merged
camilasan merged 3 commits into
masterfrom
cmd-env-vars
Jul 29, 2025
Merged

adds ability to specify user and password via env variables #8490
camilasan merged 3 commits into
masterfrom
cmd-env-vars

Conversation

@camilasan

@camilasan camilasan commented Jul 28, 2025

Copy link
Copy Markdown
Member

Created this PR so I could solve the code conflict and merge @internet-memme's contribution: #5980

Proposal for issue #5875

It adds the ability to specify username and password in '--non-interactive' via $NC_USER and $NC_PASSWORD. This is the last option in the chain of username/password lookups.
It also updates the documentation accordingly.

documentation changes: nextcloud/documentation#13459

This comment was marked as outdated.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for specifying username and password through environment variables NC_USER and NC_PASSWORD when running in non-interactive mode. This provides an alternative authentication method for automated or scripted usage.

  • Adds environment variable fallback for username and password in non-interactive mode
  • Updates help documentation to reflect the new environment variable support
  • Includes the <cstdlib> header for environment variable access
Comments suppressed due to low confidence (1)

Comment thread src/cmd/cmd.cpp
bonni and others added 3 commits July 29, 2025 09:15
Signed-off-by: bonni <post@bonni.codes>
Signed-off-by: internet-memme <142409719+internet-memme@users.noreply.github.com>
Co-authored-by: Claudio Cambra <developer@claudiocambra.com>
…esktop into cmd-env-vars"

This reverts commit e2e3c92, reversing
changes made to def7b65.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Camila Ayres <hello@camilasan.com>
@camilasan camilasan added this to the 3.17.0 milestone Jul 29, 2025
@github-actions

Copy link
Copy Markdown
Contributor

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

SHA256 checksum: 9641cd702300455a9c404d9693cbb634c55a95a26f88f84dabf1a6e2dac31f91

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.

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
1 Security Hotspot
C Maintainability Rating on New Code (required ≥ A)
4 New Code Smells (required ≤ 0)

See analysis details on SonarQube Cloud

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

@camilasan
camilasan merged commit 6fbe162 into master Jul 29, 2025
15 of 18 checks passed
@camilasan
camilasan deleted the cmd-env-vars branch July 29, 2025 08:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants