This article was written 133 days ago. The content of the article may be out of date.

Every time I use git to commit to my repository, I need to type my username and keys. So how can I get rid of it?

First, type these:

1
2
git config --global user.email "your git email"
git config --global user.user "your git username"

Then type these:

1
git config --global credential.helper store

store means save the keys and username forever until you manually delete them.

If you want it to save just for a certain time, you can type:

1
git config --global credential.helper cache

cache means 15mins.

1
git config credential.helper 'cache --timeout=3600'

This means 2 hours.