Search code examples
gitbitbucketgit-clone

How to solve git remote end hung up unexpectedly?


The issue that I can't access a private repo. I have set SSH keys and everything.

Error checking out spec='custom-branch' for repo [email protected]:private-repo/fivetran-dbt-stripe.git
fatal: couldn't find remote ref custom-branch
fatal: the remote end hung up unexpectedly

The code above is been initiated from a cli app which I insert the repo name into.

However, I can access git

[nir@dba-dev fivetran_dbt]$ ssh -T [email protected]
authenticated via ssh key.

You can use git to connect to Bitbucket. Shell access is disabled

Also, git clone of [email protected]:private-repo/fivetran-dbt-stripe.git works. How can I investigate the root cause of this?

enter image description here


Solution

  • Also, git clone of [email protected]:private-repo/fivetran-dbt-stripe.git works

    Then, inside the local clone, do:

    git branch -avv
    

    You will see the remote branches from that repository, and will be able to pick an actual existing remote branch name (since custom-branch does not seem to exist)