git config --global credential.helper store git credential-store store protocol=http host=10.24.21.1 username=xxx password=xxx
参考:
https://unix.stackexchange.com/questions/379272/storing-username-and-password-in-git