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

YADM pushes to Github using the wrong user credentials? #462

Closed
BaconIsAVeg opened this issue Jul 16, 2023 · 2 comments
Closed

YADM pushes to Github using the wrong user credentials? #462

BaconIsAVeg opened this issue Jul 16, 2023 · 2 comments
Labels

Comments

@BaconIsAVeg
Copy link

BaconIsAVeg commented Jul 16, 2023

I wanted to setup YADM with a new Github account, instead of using the same account I use for my work organization.

I've created a new ssh key and uploaded it to the new github account, setup my .ssh/config with the custom hostname:

Host github.com
  Hostname github.com
  User git
  IdentityFile ~/.ssh/id_rsa

Host github.com-personal
  Hostname github.com
  User git
  IdentityFile ~/.ssh/personal

I've also setup the yadm remote to use the new hostname:

yadm remote -v
origin	git@github.com-personal:BaconIsAVeg/dotfiles.git (fetch)
origin	git@github.com-personal:BaconIsAVeg/dotfiles.git (push)

However when I check the commit history on my repo, it shows that BaconIsAVeg authored the commits, but my other account committed them.

The ssh config is setup correctly, as when I ssh to github.com or github.com-personal, I see the appropriate username.

I've also populated the correct user/email in ~/.config/yadm/config.

yadm config -l --show-origin
file:/home/atlas/.config/yadm/config    user.email=<email>
file:/home/atlas/.config/yadm/config    user.name=BaconIsAVeg
file:/home/atlas/.config/yadm/config    github.user=BaconIsAVeg
file:/home/atlas/.config/yadm/config    branch.autosetuprebase=always
file:/home/atlas/.config/yadm/config    branch.autosetupmerge=true
file:/home/atlas/.config/yadm/config    rebase.autostash=true
file:/home/atlas/.config/yadm/config    diff.tool=mydiff
file:/home/atlas/.config/yadm/config    difftool.mydiff.cmd=colordiff -NuBbwi "$LOCAL" "$REMOTE"
file:/home/atlas/.config/yadm/config    push.default=current
file:/home/atlas/.config/yadm/config    color.diff=auto
file:/home/atlas/.config/yadm/config    color.status=auto
file:/home/atlas/.config/yadm/config    color.branch=auto
file:/home/atlas/.config/yadm/config    color.interactive=auto
file:/home/atlas/.config/yadm/config    color.ui=true
file:/home/atlas/.config/yadm/config    color.pager=true
file:/home/atlas/.config/yadm/config    color.sh=auto
@BaconIsAVeg
Copy link
Author

Interestingly, if I move my ~/.gitconfig file, yadm responds with 'Author identity unknown'. So it's not using the ~/.config/yadm/config file at all.

@BaconIsAVeg
Copy link
Author

Ok, I found the answer in the FAQ. Sorry!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant