git clone ssh://user@host:port/project_folder.git
git clone ssh://user@host:port/project_folder/origin.git
Hello! I'm trying to clone remote repository AND always GET ERROR:
Cloning into 'origin'... ssh: connect to host _my_host port _my_port: Connection timed out fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.
connecting via ssh with public/private key is successfull but in that case it asks the passphrase
git does not ask the passphrase
Please, help me understand what i'm doing wrong ....(
A. git does not use ssh key?
B. git uses it, but syntax is wrong, should we specify parameter for passphrase?
C. project name is wrong? so how to get correct project name??
Remote repositary is not github project.
!!!!!!!!! **DECISION HAS BEEN FOUND: problem is at restricted access for git remote access to this repo. Wandering, why GIT doesn't show explicit reason of such error.. THANK YOU GUYS. THANKS FOR YOUR GOOD ANSWERS, ATTENTION TO OTHER'S QUESTIONS. **
Don't know which of answers to check as decision. What do you think about it?
If you know the path of that repo on the remote server, you can try and use, from your local machine, the URL:
This assume there is a bare repo at the folder
/full/path/to/repo.git
on the remote server.And that it is accessible to the user making the remote session.
The OP confirms:
Following might be some of the issues what you might be facing.
If your a part of the project and your mentor has assigned you to that repository than only you can have an access to it.
You can easily check whether your assigned to that repository or not by typing github.com and followed by the company, group or any specific name where it is hosted.
Once you hit the above URL and if your able to see the project than your having the proper access to the repository or else not.
Navigate to your
~/.ssh
folder.You will find id_rsa and id_rsa.pub. Sometimes you will generate more than one sha keys as you may want to collabrate for your personal git hub account other than your company.
id_rsa.pub is the file content that you need to copy and paste in the github settings.
You can use cat id_rsa.pub to see the content and copy from the command line.
Navigate to your github settings from the top right corner by click on Settings.
Once your on this page on left side bar click on SSH and GPG keys and then add your new SSH key which you had copied.
Now your all good to go with cloning the remote repository.