Search code examples
gitgit-bashtortoisegitsmartgit

Git push works in Git Bash but not in SmartGit or TortoiseGit


So I've created a repo using Git Bash, and it works (Local and Remote repo on github.com). I've pushed README file for testing, and it worked. In my config everything seems okay:

[core]
    repositoryformatversion = 0
    filemode = false
    bare = false
    logallrefupdates = true
    symlinks = false
    ignorecase = true
    hideDotFiles = dotGitOnly
[gui]
    pruneduringfetch = true
    encoding =
[remote "origin"]
    url = git@github.com:SOME_USERNAME/some-project-name.git
    fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
    remote = origin
    merge = refs/heads/master

And $ ssh -V git@github.com gives:

Hi SOME_USERNAME! You've successfully authenticated, but GitHub does not provide shell access.

And I'm able to push files and everything, but only through Git Bash. However, I've tried to work with and it gave me the following error:

The remote end hung up unexpectedly

When I manually changed the "origin" url to this:

https://SOME_USERNAME@github.com/SOME_USERNAME/some-project.git

It worked. So it doesn't work with "git@..." but do work with "https://..". I've tried another program - SmartGit. It also gives me

The remote end hung up unexpectedly

but when I try to do this "change url trick" in SmartGit, for "https://..." it gives me the following error:

Push: Authentication failed

Authentication failed Setting remote

Setting remote service path not supported by protocol.

I'm completely lost with all this stuff. What am I doing wrong?


Solution

  • Try running SmartGit as administrator.