Nextcloudcmd on macOS does not authenticate automatically

Hi to all, this is my first post and I’d like at first to thank developers for the great work and the community for the support.

When I launch the command line client on Mac OS X (10.9.5), it asks me username and password instead of using the credentials stored by the GUI client, as I read in the OC documentation:

I verified that the macOS keychain allows nextcloudcmd to access saved credentials without requiring any confirmation (see the attached image), but it seems not to work.

Since this feature is pretty important for me, I’d like to know if it’s a bug and eventually who can help me to fix it (I’d like to sponsor his/her work, obviously).


An additional info: I just tested the latest version of ownCloud client for macOS (v2.2.4.3709): same behaviour. I missed to point that I’m running Nextcloud 10.0.1 as server.

As further explanation, I’m working with Nextcloud to rebuild what was known as “Mobile Account” feature (aka PHD, Portable Home Directories) which has been killed by Apple in its latest macOS release. I’m at a good point, but I absolutely need nextcloudcmd authenticate by using the same stored credentials used by the GUI client.
In the mean time, I’m running nextcloudcmd with the -n switch, and I’m pleased that the .netrc auth method works, but it’s not a viable solution for production use.

I renew my offer to sponsor the work of whoever will be able to make that working.

Thanks again.

A bit more detailed update: just tested with the latest version 2.3.0 on ownCloud Desktop Client. Here are relevant lines from the output of “owncloudcmd /Users/demo/ownCloud/Documents”:

OCC::DiscoveryJob(0x7fe5d261ae20)  Calling into main thread...
!!! OCC::LsColJob created for "" + "/Documents" "OCC::DiscoverySingleDirectoryJob"
void OCC::AbstractNetworkJob::slotFinished() QNetworkReply::NetworkError(AuthenticationRequiredError) "Host requires authentication" QVariant(int, 401)
void OCC::DiscoverySingleDirectoryJob::lsJobFinishedWithErrorSlot(QNetworkReply *) "Host requires authentication" 401 QNetworkReply::NetworkError(AuthenticationRequiredError)
void OCC::DiscoveryMainThread::singleDirectoryJobFinishedWithErrorSlot(int, const QString &) 1 "Host requires authentication"
OCC::DiscoveryJob(0x7fe5d261ae20)  ...Returned from main thread
1 when opening  msg= "Host requires authentication"
[4] csync_ftw  opendir failed for  - errno 1
[6] csync_statedb_close  sqlite3_close=0
 #### ERROR during  csync_update :  "CSync failed due to unhandled permission denied. Host requires authentication"
void OCC::SyncJournalDb::close() "/Users/demo/ownCloud/Documents/._sync_beced333bc1e.db"

Even in this case I allowed owncloudcmd to access the same Keychain’s items the full GUI app uses successfully.