nlewo / comin

GitOps For NixOS Machines
MIT License
241 stars 11 forks source link

authentication.md doesn't mention comin user #38

Open jpds opened 2 months ago

jpds commented 2 months ago

The authentication.md document doesn't mention the requirement of the hardcoded comin user:

https://github.com/nlewo/comin/blob/425c747ab2fca90db10dc498acfc94f5caaeba52/internal/repository/git.go#L25

I'd simply created the access token under my own user and gave it to comin - I think this should be configurable.

nlewo commented 2 months ago

The username is actually not used by the GitLab/GitHub HTTP authentication, but it should not be an empty string. This is why the user comin is hardcoded.

I don't think there is currently a need to make it configurable.

jpds commented 2 months ago

This doesn't work on my Forgejo instance because it tries to login as comin - but the token is tied to my account.

nlewo commented 2 months ago

@jpds Is this documented somewhere in the codeberg documentation?

jpds commented 2 months ago

Basically, all I see is:

routers/web/web.go:120:func7() [E] Failed to verify user: user does not exist [uid: 0, name: comin]

I did also try renaming my normal user to comin and started getting:

...rvices/auth/basic.go:130:Verify() [E] UserSignIn: user's password is invalid [uid: 1, name: comin]
routers/web/web.go:120:func7() [E] Failed to verify user: user's password is invalid [uid: 1, name: comin]