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

ArgoCD v2.4.0 - Unable to run CLI commands on Windows due to "config file has incorrect permission flags" error #9666

Closed
3 tasks done
trentcain opened this issue Jun 15, 2022 · 5 comments · Fixed by #9732
Closed
3 tasks done
Labels
bug Something isn't working

Comments

@trentcain
Copy link

trentcain commented Jun 15, 2022

Checklist:

  • I've searched in the docs and FAQ for my answer: https://bit.ly/argocd-faq.
  • I've included steps to reproduce the bug.
  • I've pasted the output of argocd version.

Describe the bug

The CLI is returning the error "config file has incorrect permission flags:-rw-rw-rw-.change the file permission either to 0400 or 0600." when running commands on Windows.

I have tried changing the permissions on my config file so that only my user (the owner of the file) has access to it however it still produces the same error. I have also tried deleting the config file and generating a new file via argocd login but it didn't help.

I do not get the error on v2.3.4.

To Reproduce

  1. Run argocd app list

This also occurs when running other commands such as argocd cluster list and argocd proj list.

Expected behavior

The command runs without any errors and returns the list of applicatons.

Screenshots

image

Version

argocd: v2.4.0+91aefab
  BuildDate: 2022-06-10T17:54:25Z
  GitCommit: 91aefabc5b213a258ddcfe04b8e69bb4a2dd2566
  GitTreeState: clean
  GoVersion: go1.18.3
  Compiler: gc
  Platform: windows/amd64

Logs

time="2022-06-15T19:47:59+10:00" level=fatal msg="config file has incorrect permission flags:-rw-rw-rw-.change the file permission either to 0400 or 0600."
@trentcain trentcain added the bug Something isn't working label Jun 15, 2022
@trentcain trentcain changed the title CLI returns "config file has incorrect permission flags" error on Windows ArgoCD 2.4 CLI - Unable to run commands on Windows due to "config file has incorrect permission flags" error Jun 15, 2022
@trentcain trentcain changed the title ArgoCD 2.4 CLI - Unable to run commands on Windows due to "config file has incorrect permission flags" error ArgoCD v2.4.0 - Unable to run CLI commands on Windows due to "config file has incorrect permission flags" error Jun 15, 2022
@balajirajmohan
Copy link

PS C:\Users\Balaji Rajmohan> argocd app list
time="2022-06-16T17:48:37+05:30" level=fatal msg="config file has incorrect permission flags:-rw-rw-rw-.change the file permission either to 0400 or 0600."
PS C:\Users\Balaji Rajmohan>

@ABRIO-PR
Copy link

ABRIO-PR commented Jul 1, 2022

The same issue on Ubuntu 20.04

argocd: v2.4.3+471685f
BuildDate: 2022-06-27T21:23:52Z
GitCommit: 471685f
GitTreeState: clean
GoVersion: go1.18.3
Compiler: gc
Platform: linux/amd64
FATA[0000] config file has incorrect permission flags:-rw-r--r--.change the file permission either to 0400 or 0600.

@crenshaw-dev
Copy link
Collaborator

@ABRIO-PR the problem in Windows was that 0400/0600 was not possible. Are you able to chmod the config file on Ubuntu?

@ABRIO-PR
Copy link

ABRIO-PR commented Jul 1, 2022

Okay, thanks, it works )

@tekbot
Copy link

tekbot commented Jul 17, 2023

This might only be useful to me, in the future, hitting this issue again and not remembering where the argocd config file is. After finding it for the nth time and fixing the issue, the argocd config file lives here: ~/.config/argocd/config.

Obviously, this is for a linux installation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants