0

Multiple Github accounts make me crazy. So I have two my own github accounts.

I found really useful tutorial to add multiply account on my Mac. So first off all I already have working copy on my Mac and seems now it work when I did all steps from that video tutorial.

But when I try to push my changes via Source Tree I see this:

Pushing to https://github.com/SuperApps/SuperApp.git
remote: Repository not found.
fatal: repository 'https://github.com/SuperApps/SuperApp.git/' not found

thought right after this message I open terminal and make:

git push origin new_branch

And I see this:

Counting objects: 16, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (16/16), done.
Writing objects: 100% (16/16), 40.45 KiB | 0 bytes/s, done.
Total 16 (delta 12), reused 0 (delta 0)
To https://github.com/SuperApps/SuperApp.git
   8f89744..0b89b79  new_branch -> new_branch

which means that https://github.com/SuperApps/SuperApp.git exists and I can push to it but not via Source Tree.

Alos when I tried in terminal this:

ssh -T git@github.com
The authenticity of host 'github.com (IP ADDRESS HERE)' can't be established.
RSA key fingerprint is SHA256:kThbg6kBlpJW4l7E1IGO5lpRomTxdCARLviKw7GHSY8.
Are you sure you want to continue connecting (yes/no)? yes

And when I written yes: Hi MySecondAccountName! You've successfully authenticated, but GitHub does not provide shell access.

But when I am checking commits on github the author is MyFirstAccountName.

I've checked also SourceTree settings and there is MySecondAccountName is default github account. Seems should works but it does not.

To summarise:

  1. I have problem to push changes via SourceTree but not via terminal.
  2. Does actually ssh -T git@github.com means that I should see current git authorised user. If yes why I see commits from my another git user.

So here few problems.

Matrosov Oleksandr
  • 25,505
  • 44
  • 151
  • 277
  • I don't have time for a proper answer, but I'll just say: the *author name* in a git commit is set at time time you make the commit, based on `user.name` and `user.email` in the *git* config. The ssh session *user name* is set at the time you run `ssh` (or `git push` runs `ssh` for you), which is long after that; you'll push the author name you set earlier. Meanwhile I know nothing about using SourceTree, which is where the main problem seems to be. – torek Jun 20 '16 at 19:53
  • @torek ok got your idea about user.email and user.name thanks – Matrosov Oleksandr Jun 21 '16 at 09:50

0 Answers0