The specific problem is that I may have these projects on git now, and then I want to use these projects through different ssh keys.
This requires generating multiple sshkeys on one machine, and then Different projects use different keys when pushing. Has this been used before?
Ask for advice
No, generally using multiple ssh keys is managed by corresponding to multiple github accounts
Generate the specified key ssh-keygen -t rsa -C "email address" -f ~/.ssh/youname
Modify different hosts
vim ~/.ssh/config
I don’t think there is such a usage. I think the poster’s request is very strange. However, there are some very practical functions on github that may be of some use to the poster. You can find these functions in the "Settings" menu of github:
SSH and GPG keys
You can use multiple ssh-keys or gpg-keys on Github to associate your account, but it cannot meet the requirements of the original poster.
Personal access tokens
This is a token-like function, a bit like Oauth's access token. This is how I understand it, that is, when we want to temporarily give a user permission to push to the warehouse, we can generate a Personal access token, grant the corresponding permissions, and then send this permission to that user, and that user can have Push permissions. Isn’t it a bit like a token?