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

SSH config sometimes gets edited in a wrong way when running gogit set #2

Open
seppedelanghe opened this issue Sep 18, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@seppedelanghe
Copy link
Owner

Observation

When running gogit set multiple times, the wrong block in the ~/.ssh/config file gets edited sometimes, resulting in the same block twice. ~/.gitconfig and ~/gogit.ini seem like they get edited correctly

For example:

A config like:

Host github.com
    Hostname github.com
    User git
    Port 22
    IdentityFile ~/.ssh/id_rsa_a

Host github.com-b
    Hostname github.com
    User git
    Port 22
    IdentityFile ~/.ssh/id_rsa_b

Becomes:

Host github.com-b
    Hostname github.com
    User git
    Port 22
    IdentityFile ~/.ssh/id_rsa_a

Host github.com-b
    Hostname github.com
    User git
    Port 22
    IdentityFile ~/.ssh/id_rsa_b

Instead of:

Host github.com-a
    Hostname github.com
    User git
    Port 22
    IdentityFile ~/.ssh/id_rsa_a

Host github.com
    Hostname github.com
    User git
    Port 22
    IdentityFile ~/.ssh/id_rsa_b
@seppedelanghe seppedelanghe added the bug Something isn't working label Sep 18, 2023
@seppedelanghe seppedelanghe self-assigned this Sep 18, 2023
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

No branches or pull requests

1 participant