Duplicacy CLI cannot find MacOS keychain creds in launchd

Hello!

I’ve been trying to set up the CLI app to run on a simple schedule on my mac using launchd (to google drive, encrypted with password). I was able to get it to run if all credentials are hardcoded into the duplicacy preferences file, but having these things stored in Keychain is both incrementally more secure and easier to manage (especially for less technical relatives!)

If I run duplicacy via my script in a terminal, it works as intended (duplicacy has keychain access, I confirmed). When I run it via launchd I get this:

Keychain Get: Error Code: -25308

This seems to suggest the key does not exist. I am running the launchd as the user (who is logged in), not root, but just to be sure I copied both duplicacy creds over to the system keychain from the login keychain - same result.

Which keychain is duplicacy trying to access here?

I haven’t tested myself, but would this work for you: macos - Launchd not able to access Mac OS keychains - Stack Overflow

Thanks for the reply! I did spot that and have indeed added it (I also tried to add the username key as well) with no luck. I might try making it with Lingon (a launchd editor) but as far as I can tell the solution you mentioned is supposed to work.

Is there a way I can see which keychain it is attempting to access? I’ve tried debug mode but that just got me the error code.