Tag Archives: Git push Warning

How to Fix Git push warning: push.default is unset;

warning: push.default is unset; its implicit value is changing in
Git 2.0 from ‘matching’ to ‘simple’. To squelch this message
and maintain the current behavior after the default changes, use:

git config –global push.default matching

To squelch this message and adopt the new behavior now, use:

git config –global push.default simple

See ‘git help config’ and search for ‘push.default’ for further information.
(the ‘simple’ mode was introduced in Git 1.7.11. Use the similar mode
‘current’ instead of ‘simple’ if you sometimes use older versions of Git)

Everything up-to-date

 

Here’s the difference between push.default matching and push.default simple.

The push.default setting maching means that git push will push all your local branches to the remote host with the corresponding name. This means that you might inadvertently push some branches that you didn’t intend to push.

Setting push.default to simple means that git push only pushes the branch you are currently on to the branch you pulled from git pull in the first place, and it also checks to see if the names of the branches are the same.

 

Git push Warning: The authenticity of host ‘github.com (52.74.223.119)’ can’t be established.

The problem:

Created a remote repository on github and pushed my code to it git push -u origin master with the following error

The authenticity of host ‘github.com (52.74.223.119)’ can’t be established.

RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.

Are you sure you want to continue connecting (yes/no)?yes

Warning: Permanently added ‘github.com,52.74.223.119’ (RSA) to the list of known hosts.

[email protected]: Permission denied (publickey).

fatal: Could not read from remote repository.

Reason for the problem: Github and ssh connection requires a key

 

Solution:

1. local mac public key path to get the key: cd ~/.ssh (id_rsa.pub)

2. Login to your own github into the project repository —- into setting —- Deploy keys

3. When configuring the ssh key, check the following Allow write access, the deploy key section in settings to have read and write permissions

4. After the configuration is complete and then go to the project to operate git can

Solution:

git push -u origin master

Enumerating objects: 3, done.

Counting objects: 100% (3/3), done.

Writing objects: 100% (3/3), 218 bytes | 109.00 KiB/s, done.

Total 3 (delta 0), reused 0 (delta 0)

To git+ssh://github.com/illusion1010/Hog.git

* [new branch] master -> master

Branch ‘master’ set up to track remote branch ‘master’ from ‘origin’.