S Usman
S Usman

Reputation: 63

Issues Pushing to Github (HTTP/SSH)

I have two separate issues and solving either of them would be a huge help to me. I'm trying to push some changes I made to my git repo and I can't seem to get it two work.

The first way I've tried to do it is by using the command I'd been doing up until now:

git push

but this would get hung up around 30% of the way through the commit. Following some posts I found online, I've convinced myself that this is a problem with the HTTP connection. I tried using:

git push --verbose --progress

and it always gets stuck at

Pushing to https://github.com/my-account/my-repo.git
Counting objects: 87, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (66/66), done.
POST git-receive-pack (chunked)476.45 MiB | 29.64 MiB/s  

I don't have any big files, so I'm not sure what the hang up is. After looking at some StackOverflow pages, I tried using:

git config http.postBuffer 524288000

which is (I think) supposed to stop it from chunking the data to buffer and allow bigger files to go through, but I got no change. I then tried updating my version of git (it was at 2.10.something and is now 2.13.1), but that didn't change anything.

Someone suggested using SSH, but I can't seem to get my SSH key to work. I tried using:

git push -v ssh://[email protected]/my-repo.git

but I always get the error:

Pushing to ssh://[email protected]/my-repo.git
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

So I went to great lengths trying to get this thing working, even going so far as to regenerate my keys and reregister it with my account, making sure to edit the config to make sure it's all working. It's verified; the command

ssh -T [email protected]

returns

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

but, of course,

git push -v ssh://[email protected]/my-repo.git

returns the same error as before, Permission Denied. Any ideas on how to fix either the issue with the SSH verification or with the HTTP buffering problem?

Upvotes: 1

Views: 304

Answers (1)

Jakuje
Jakuje

Reputation: 26016

Github is using a single user for ssh and the name of the user is part of the path, such as [email protected]:my-account/repo.git.

Upvotes: 1

Related Questions