I can't reproduce the problem precisely, but I'm guessing you did not set
up "origin" to be a *bare* repo.
You can't push to regular repos. Distributing changes between regular repos
requires a strict fork-and-pull workflow, although cloning is also
To set up a repo that you want to push to (analogous to a repo on GitHub)
you need something like the following procedure:
$ mkdir ~/my-project.git/ # Alongside the regular repo ~/my-project/
$ cd ~/my-project.git/
$ git init --bare
$ cd ~/my-project/
$ git remote add origin ~/my-project.git/
$ git push origin master
If the bare repo is on some other machine that you can ssh to instead of
locally, the changes to make are reasonably obvious:
my-git-server $ mkdir ~/my-project.git/
my-git-server $ cd ~/my-project.git/
my-git-server $ git init --bare
my-local-box $ cd ~/my-project/
my-local-box $ git remote add origin my-git-server:my-project.git
my-local-box $ git push origin master
Creating and manipulating bare repos is basically how GitHub works under
the hood. Everything else is just convenient bling-bling :)
On Mon, Oct 30, 2017 at 12:07:23AM -0700, Martin wrote:
> Hi, All:
> I created a repository on a home server. I can ssh to the server without
> any issue. I can also 'git clone' the empty repository from another home
> computer and everything works fine.
> I then tried a simple "git add, git commit". No issue! However, when I do
> 'git push origin master', it got stuck there forever without issuing any
> warning or error message, as below:
> abigail@abilina:~/my-project$ git push origin master
> email@example.com's password:
> Counting objects: 3, done.
> Writing objects: 100% (3/3), 208 bytes | 0 bytes/s, done.
> Total 3 (delta 0), reused 0 (delta 0)
> The push wasn't successful and got stuck like this. What could be the
> You received this message because you are subscribed to the Google Groups
> "Git for human beings" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to git-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "Git
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email
For more options, visit https://groups.google.com/d/optout.