4

I want to disable a working git ssh key. But do not know the owner of the ssh key. For both disabling the key or removing the user, I would need to know the user details.

The file:.git/config does not include the user information.

And I face the below error when I try to commit

*** Please tell me who you are.

Run 

  git config --global user.email "[email protected]"
  git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

FYI: The key is SAML authorized.

Can I know if there is a way we can find the git user using the ssh key?

8
  • You can inspect authorized_keys and afterwards take a look into the public key usually in the comment part you should see the user or machine <algorithm> <key> <comment> Commented May 5, 2021 at 12:27
  • Unfortunately, the machine only has a private key, no public key found inside the machine. Commented May 5, 2021 at 12:36
  • You can use any user to commit, the SSH key is for pushing. Commented May 5, 2021 at 12:41
  • You can convert a private key to public: stackoverflow.com/a/38290956/7976758 Commented May 5, 2021 at 12:59
  • @phd But the generated public key will not have the user email in the comment right? Commented May 5, 2021 at 13:12

1 Answer 1

4

You can connect to Github using that public key

ssh -T [email protected]

Returns:

Hi githubUser! You've successfully authenticated, but GitHub does not provide shell access.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.