I'm using git on a Ubuntu/Debian machine. I know how to config user informations (name, mail) for repositories. But with a private github repository, it always require a token each time I push or pull to/from remote. This is repetitive, so I wonder if there's a solution to this. I think that the token can ben save somewhere and automatic login like the github desktop on Window.
I searched google but didn't find out solution.
Many thanks for suggestions!
Following the official instructions of Github on SSH key worked for me It contains 2 steps:
ssh-keygen -t ed25519 -C "your_email@example.com"
> Generating public/private ALGORITHM key pair.
> Enter a file in which to save the key (/home/YOU/.ssh/id_ALGORITHM):[Press enter]
> Enter passphrase (empty for no passphrase): [Type a passphrase]
> Enter same passphrase again: [Type passphrase again]
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519
cat ~/.ssh/id_ed25519.pub
# Then select and copy the contents of the id_ed25519.pub file
# displayed in the terminal to your clipboard