One thing that I had to do, but is not recommented is save credentials of git in cache. This is because I couldn’t setting the ssh successfully for a git repository. Anyway, the next command helps me

git config --global credential.helper 'cache --timeout=7200'

The next link is where I find out how to use it.