Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cp failing due to identical files is still counted as a failure #825

Open
Tsaukpaetra opened this issue Dec 3, 2023 · 0 comments
Open

Comments

@Tsaukpaetra
Copy link
Contributor

Describe the bug
I did a silly and configured a destination location to be the same as its original location (i.e. DOMAIN_KEY_LOCATION="/root/.getssl/domain.com/domain.com.key")

which resulted in this as an apparently fatal error:

copying private key to /root/.getssl/domain.com/domain.com.key
cp: /root/.getssl/domain.com/domain.com.key and /root/.getssl/domain.com/domain.com.key are identical (not copied).
getssl: cannot copy /root/.getssl/domain.com/domain.com.key to /root/.getssl/domain.com/domain.com.key

Traceback

 main() line 3189 called

  cert_install() line 431 called

   copy_file_to_location() line 1108 called

    error_exit() line 1301 called traceback

To Reproduce
Set a location for the key/cert/whatever to the same location as it is already in.

Expected behavior
Probably a catch warning for cp when it emits that specific error and note that the file wasn't updated.

Operating system (please complete the following information):

  • OS: FreeBSD namp 13.1-RELEASE-p7 FreeBSD 13.1-RELEASE-p7 n245428-4dfb91682c1 TRUENAS amd64
  • Bash Version tcsh 6.21.00 (Astron) 2019-05-08 (x86_64-amd-FreeBSD) options wide,nls,dl,al,kan,sm,rh,color,filec

Additional context
Just noticed that a renewal was failing and had time to troubleshoot it properly today. I think I originally made the mistake when troubleshooting scp auto-login issues and just never actually checked if it was working to the end of the process.
Lowest priority. Just wanted to share my mirth when I realized I made a stupid happen. :)

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

No branches or pull requests

1 participant