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

jj confused if /etc/passwd does not contain the current username #5370

Closed
marco-m-pix4d opened this issue Jan 15, 2025 · 2 comments
Closed

Comments

@marco-m-pix4d
Copy link

marco-m-pix4d commented Jan 15, 2025

Description

This is somehow a corner case, but here it goes. I started seeing this happening with 0.25. I think that before this was not a problem.

jj fails the majority of commands if /etc/passwd does not contain the current username

What is peculiar about my setup is that this is a Linux VM provided by a VMWare system called VDI, which has LDAP integration, so that /etc/passwd is missing the username. I believe that this is the cause.

Steps to Reproduce the Problem

  1. Remove the line with your username from /etc/passwd
  2. Run any command, it doesn't matter if inside or outside a repo.

Expected Behavior

Outside a repo:

$ jj st
Error: There is no jj repo in "."

Actual Behavior

$ jj st
Config error: Invalid type or value for operation.username
Caused by: Null record
For help, see https://jj-vcs.github.io/jj/latest/config/.

This becomes nasty for example:

$ jj config edit --user
Config error: Invalid type or value for operation.username
Caused by: Null record
For help, see https://jj-vcs.github.io/jj/latest/config/.

Workaround

This took me a while to figure out, because https://jj-vcs.github.io/jj/latest/config doesn't mention operation. I found only one mention in the CHANGELOG.

Add to ~/.config/jj/config.toml:

[operation]
username = "something"

Additional comments

I love jj! Thanks!

Specifications

  • Platform: Linux Ubuntu 22.04, VDI VMWare, LDAP integration that overrides /etc/passwd
  • Version: 0.25
@martinvonz
Copy link
Member

This sounds like a duplicate of #5231. You can try building from source after #5247, or wait for 0.26 (early February).

@marco-m-pix4d
Copy link
Author

Ah! You are right. I completely missed that! 🤦 Thanks.

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

2 participants