If your online git server does not allow ssh (like Microsoft Visual Studio Online), you can store git credentials in a file (not safe)
git config credential.helper storesee https://git-scm.com/docs/git-credential-store