0

Using Terminal I made a few commits being:

git push
Enter username: username
Enter password: password

When I do it like this, the commits don't add up to my contribution graph on GitHub (even tough they are in the repository). However, when I do:

git push
Enter username: email address
Enter password: password

they show up. Is there something I'm doing wrong or is this just how GitHub works?

I've already set up the git config --global user.email and git config --global username.

Karina Kozarova
  • 1,145
  • 3
  • 14
  • 29
  • You should use GIT thru ssh and configure it appropriately to avoid typing any user and password – Basile Starynkevitch May 25 '17 at 15:23
  • Possible duplicate of [Git push requires username and password](https://stackoverflow.com/questions/6565357/git-push-requires-username-and-password) – hurturk May 25 '17 at 15:29
  • @BasileStarynkevitch if you mean the git config --global user.email and .name, i've already done them. – Karina Kozarova May 25 '17 at 15:31
  • Read some [SSH tutorial](https://support.suso.com/supki/SSH_Tutorial_for_Linux). You want to generate a key, use a public key, etc. You certainly don't want to type a user + password on every `git push` – Basile Starynkevitch May 25 '17 at 15:33
  • Make sure you have set that email to the same email that github has on file, or it cant count your contribution – Matt Messersmith May 25 '17 at 15:43

2 Answers2

2

I think the problem is not the "authentication" part. github counts contributions based on the mails of the authors of the revisions. You could push stuff from 100 other developers on a project (because they are the authors) and they would get the contributions.

eftshift0
  • 26,375
  • 3
  • 36
  • 60
  • 1
    And sure.... you could set up ssh certificates so there's no need to provide username/password every time you fetch/push.... but it's not related to the contribution problem you are asking about. – eftshift0 May 25 '17 at 15:43
1

You should read an SSH tutorial (so generate once your SSH keys) and set up some SSH key on github using https://github.com/settings/keys

You should not have to enter your user & password at every git push (or any git command involving remote access to the github servers)

See also this. So use e.g. git clone git@github.com:karinakozarova/Made2Make.git to clone your Made2Make github repository on your local computer

Basile Starynkevitch
  • 223,805
  • 18
  • 296
  • 547