You can enable credential storage in Git using git config.
shellgit config --global credential.helper store
When you run this command, the system will prompt you for your username and password the first time you pull or push from a remote repository.
Subsequently, for subsequent communication with the remote repository, you do not need to provide your username and password.
The credentials are stored in the .git-credentials file in plaintext format.
Additionally, you can use other helpers like git config credential.helper for memory caching:
shellgit config credential.helper 'cache --timeout=<timeout>'
It requires an optional timeout parameter that determines how long credentials are retained in memory. With this helper, credentials never touch the disk and are deleted after the specified timeout. The default value is 900 seconds (15 minutes).
Warning: If you use this method, your Git account password will be stored in plaintext in the global .gitconfig file, for example, at /home/[username]/.gitconfig on Linux.
If you do not wish to do this, use an SSH key instead for your account.