Q:

Getting Git init to automatically use SSH

I'm using Github SSH to push my files. I have ssh configured, but every time I init a new repo I need to change the .git/config file manually to change 
url = https://github.com/alex3wielki/project-setup.git

to
url = ssh://git@github.com/alex3wielki/project-setup.git

but still I have to add my credentials on the first push. Is there any way to make it automatic?

A:

Yes 
If Git prompts you for a username and password every time you try to interact with GitHub, you're probably using the HTTPS clone URL for your repository.
Using an HTTPS remote URL has some advantages: it's easier to set up than SSH, and usually works through strict firewalls and proxies. However, it also prompts you to enter your GitHub credentials every time you pull or push a repository.
You can configure Git to store your password for you like this below : 
Store your credential using this 
Caching your GitHub password in Git (Tip: You need Git 1.7.10 or newer to use the credential helper) : 
git config --global credential.helper wincred

In case you want to delete your credential :
Deleting your credentials via the command line
git credential-osxkeychain erase
host=github.com
protocol=https

A:

When you do
git remote add origin "link from github repo"

use ssh URL instead of https URL. You can get ssh URL when you're logged-in into your github account. Or you can manually translate https URL to ssh, it's quite obvious:
https://github.com/alex3wielki/project-setup.git

to
git@github.com:alex3wielki/project-setup.git

I.e. replace https:// with git@ and replace the first / with :.
To get ssh URL for a repo click Clone or download button. A dialog opens; switch the protocol from HTTPS to SSH; copy the URL to clipboard and paste it to the command line. See https://help.github.com/articles/cloning-a-repository/

