How do I connect remote Git?

dipper

Verified User
Joined
Jun 24, 2023
Messages
5
1687618257331.jpeg
I'm trying to connect a remote private repository, but I get an error:
Code:
Git execution message: Cloning into bare repository '.../repo.git'... fatal: could not read Username for 'https://github.com': No such device or address

Name: reponame
Remote: https://github.com/username/reponame
Keyfile: reponame_rsa

What am I doing wrong?
 
It looks ridiculous enough. I added the necessary keys to the profile and repository and entered the command in the terminal:
Code:

Code:
I got the following: Hi username! You've successfully authenticated, but GitHub does not provide shell access.

I generated this key through the terminal.

If I create a key in the DA, I cannot connect to the repository:

1.jpg
 
Are you sure your username at github.com is git ? I also see no repository location set there.
 
Are you sure your username at github.com is git ? I also see no repository location set there.
I use the address that Github gives for SSH access in the "Code" tab:
1.jpg
I use the following data for access:
Name: reponame
Remote: [email protected]:username/reponame.git
Keyfile: .ssh/id_rsa

Is this correct?
 
It looks ridiculous enough. I added the necessary keys to the profile and repository and entered the command in the terminal:
Code:

Code:
I got the following: Hi username! You've successfully authenticated, but GitHub does not provide shell access.

I generated this key through the terminal.

If I create a key in the DA, I cannot connect to the repository:

View attachment 6948
For example, I created a test public repository and I get the same error with permissions.
 
Did this get resolved ? I'm trying to do the same and getting same error no matter what I do.
 
I use the following data for access:
Name: reponame
Remote: [email protected]:username/reponame.git
Keyfile: .ssh/id_rsa

Is this correct?
Yes, this is correct.

If you specify key file path and it does not exist you should get:

Code:
Cloning into bare repository '/home/admin/domains/{domain}/{repo}.git'...
Warning: Identity file bad/path/not-exist not accessible: No such file or directory.
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.

If file has incorrect permissions it will be:

Code:
"Cloning into bare repository '/home/admin/domains/{domain}/{repo}.git'...
Warning: Permanently added the ECDSA host key for IP address '140.82.121.4' to the list of known hosts.
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@         WARNING: UNPROTECTED PRIVATE KEY FILE!          @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0644 for '.ssh/reponame_rsa' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
Load key ".ssh/reponame_rsa": bad permissions
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.

If file has 0400 permissions, it will work as expected.



If command ssh -T [email protected] works without explicitly passing the key file name, it means ssh client was able to auto-detect key file using one of the standard names like id_rsa. You can double check if you have correct key by explicitly passing the path to the key with -i parameter. Here is an example:

Code:
$ ssh -T [email protected]
[email protected]: Permission denied (publickey).
$ ssh -T [email protected] -i .ssh/reponame_rsa
Hi {username}! You've successfully authenticated, but GitHub does not provide shell access.

In this example authentication using default key name id_rsa, failed, but passing key path explicitly worked as expected. I took the name .ssh/reponame_rsa to match the one you have used in your post.
 
Hi, I am facing the same problem. What is the final solution for this? The documentation could have been easier for beginners.
 
Back
Top