top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Unable to push to 1 of the depositories in Git server

+1 vote
215 views

Anyone encountered the following error

In the remote central depository, I have 2 git depositories.
I am able to clone/pull from the 2 git depositories using https but when issue a pull, it gives return code 22 fatal: git-http-push failed error

posted May 12, 2016 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

Just for the record, because this comes up high on google when searching "git-http-push failed return code 22":

With https git and htpasswd on the server, it seems that the user name sent includes the domain: user@domain.tld, but the expected name is only user.

The solution for me was to add this in ~/.netrc :

machine host.domain.tld
login the_user_name
password the_password
answer May 15, 2016 by Amit Kumar Pandey
Similar Questions
+1 vote

I wanted to avoid push if any of the files is deleted from the local git clone area. Can anyone please help me with that?

I am using Stash for repository management.

+1 vote

Is it possible to make a git remote pack its repository on every push?

I have tried setting gc.auto to 1 on both the remote and the clients, but so far no push seems to have packed anything.

Do I need to create a push hook on the remote to make it pack?

The reason for this is that I have several git repositorier for org-mode files.

Having a history, and rollback of the history, is more important than having a good history.

The diff of each push is small, the repositories only contain one, or a handful of org-mode files, and some of the org-mode files are quite large.

The remote is git 1:2.1.4-2.1 (debian packge, git --version reports 2.1.4), running on debian 8.0 "jessie".

The clients are various GNU/linux git (whatever comes with the distro out of the box) and Win32 msysgit installations.

+1 vote

I'm using git 1.9.1 in Ubuntu 14.04.

I have a repository on github, a clone on my desktop and bare repo on a private server, in my desktop the remotes looks like this

all git@github.com:user/repo.git (fetch)
all git@github.com:user/repo.git (push)
all user@server.com:user/repo.git (push)
server user@server.com:user/repo.git (fetch)
server user@server.com:user/repo.git (push)
origin git@github.com:user/repo.git (fetch)
origin git@github.com:user/repo.git (push)

If I commit to master in my desktop and run 'git push all master', the github and the server repos are correctly updated, but if I run 'git status' the message says:

Your branch is ahead of 'origin/master' by 1 commit.
 (use "git push" to publish your local commits)

The message won't update unless I run git fetch or git push origin master. I'd expect the git status to give me a updated status message after calling 'git push all master'.

+2 votes

I've been trying to figure out why I can't push from a shallow clone (using --depth) to a repository. I've made simple examples where it works, but I've read that in doesn't work in every case. However, I can't come up with a case where it doesn't work. Googling gives this answer: http://stackoverflow.com/questions/6900103/why-cant-i-push-from-a-shallow-clone,

but I don't completely understand the explanation,Please explain.

...