Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

git pull fatal: Could not read from remote repository

Tyler Brandon June 10, 2015

Atlassian Stash v2.10.1


$ git pull
fatal: Could not read from remote repository.

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

 

$ ssh -p 7999 git@<stash-server>

shell request failed on channel 0

 

So not an ssh/authentication issue.    Was working yesterday, not working this morning, working this afternoon, not working this evening.

What could it be?

Thanks.

8 answers

1 accepted

2 votes
Answer accepted
Tyler Brandon June 11, 2015

Under load, Stash may be unable to handle all requests in an elegant way.

Thank you, Thiago and Balazs, for your help.

0 votes
3IIE April 22, 2020

here is how I got mine going.

https://stackoverflow.com/questions/13509293/git-fatal-could-not-read-from-remote-repository

Look for Tombarts answer.

In your .git/config add your username to the url and everything should work.

0 votes
akzhol_b April 8, 2019

Hello, I have same troubles. 

I have two operation system Windows 10 and Virtual Mac OS in one machine. Everything was good,until one day i have meet trouble with push/pull my commits in virtual Mac OS. I can't push or pull from my repository only Mac OS. 

 

I passed verification "iCloud Security" and after this happened.

What I've done:
1. I cleared ``known_hosts``
2. I Added new ssh-key in bitbucket.org
3. Tried to clone this repository on another folder.

Error message:
```
packet_write_wait: Connection to 18.205.93.0 port 22: Broken pipe
fatal: Could not read from remote repository.

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

akzhol_b April 8, 2019

Never mind, I migrated repository to gitlab.com.

0 votes
Andrew Burton September 25, 2018

If someone else wanders into this thread - I was accidentally sudoed into bash.  Apparently that's a no go on the push - see https://confluence.atlassian.com/bitbucket/troubleshoot-ssh-issues-271943403.html

Logged off the sudo and was able to push again.

0 votes
Muhammad Ibrahim August 9, 2018

You have to make sure that your repository name is the same as the one in your url link

e.g  git remote add origin git@bitbucket.org:username/your-repository-name.git 

Then you push.
 

0 votes
Jari_Fredriksson October 9, 2017

I have this same error per now. It worked earlier but not now.

I can clone using https, but not ssh. The error shown is the same as presented in this question...

 

In bitbucket.log there is this:

 

2017-10-09 18:12:52,988 INFO  [ssh-scm-request-handler] jenkins @XQ6B4Fx1092x38x0 1p1nx9x 127.0.0.1 SSH - git-upload-pack '/lif/com.liferay.portal.plugins.sdk-7.0.git' c.a.b.i.ssh.server.SshCommandAdapter git was successfully authenticated via public key, but is no longer active in the underlyinguser directory. The request has been blocked

 

I'm pretty sure the OP would have had something similar in Stash back then...

0 votes
Balázs Szakmáry
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 10, 2015

Since you say "Was working yesterday, not working this morning, working this afternoon, not working this evening", I doubt that Thiago is right about your user rights. (He might be right, but then somebody took your rights away to the repo, gave them back and took them away again.)

Try these:

  • If you can browse the contents of the repo on the Stash web interface, you can connect to Stash and do have at least read rights, so the issue is probably with the SSH connection.
  • If the above works, check that your SSH public key is correct in your profile (http://<stash server>/plugins/servlet/ssh/account/keys) and that your SSH agent is running on your machine and has your key loaded.
  • If all of these are OK, you might have a firewall on your computer or somewhere else blocking the connection to Stash.
Tyler Brandon June 10, 2015

Confirmed, I can browse the contents of the repo on the Stash web interface. The "shell request failed on channel 0" proves there is nothing wrong with the network (server accessibility) or the ssh authentication. We are exploring a possible loading issue (tens-of-thousands of accesses, yesterday, from a CI server).

0 votes
ThiagoBomfim
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 10, 2015

Hi Tyler,

It seems that you have a SSH key uploaded but no read access to the repository in Stash as per the error below:

$ git pull
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.

To solve that, please talk to your Stash admin so you can be assigned the right permissions.

The error below is expected because it should not be possible to get a remote shell via Stash (we use http://mina.apache.org/sshd-project/index.html for our SSH server):

$ ssh -p 7999 git@&lt;stash-server&gt;
shell request failed on channel 0

Please refer to https://jira.atlassian.com/browse/STASH-3372

Best,
Thiago

Tyler Brandon June 10, 2015

The admin has not being revoking, then reissuing the access permissions. Thanks.

ThiagoBomfim
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 11, 2015

Hi Tyler. I am glad that this answer has helped you and you found the culprit ;)

Like elquna likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events