4

To be clear, what I'm not asking is how to bring my ssh keys with me along an ssh session. I'm aware that ssh -A will do what I want.

However, what I notice is that all global config on the remote machine are being applied to my git commands, so even though my ssh key is being used to git push/pull.

The problem is that when I do commit, the Author string is not me.

So the questions is, is there any way to bring my global git config from my client machine across an ssh session to use on the remote machine?

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
xaviersjs
  • 1,579
  • 1
  • 15
  • 25

1 Answers1

0

The problem is that when I do commit, the Author string is not me.

The ssh session is done as the remote user you are specifyong in your ssh <remoteUser>@remotemachine>

Once you are in your remote ssh session, do a (with Git 2.8+):

git config -l --show-origin

You will see all configurations, including from where the user.name is coming from.

If you want at least to use the right user.name/email, you would need to specify them in your git commit command:

git commit -c user.name=xxx -c user.email=yyy commit -m "my commit"
Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250