Answer the question
In order to leave comments, you need to log in
Where is the .ssh folder located?
I have the key to the repositories. You need to create a .ssh/config file in your git home directory and write something there. Can you tell me how to do it algorithmically? Or poke where this is explained simply, if you don’t practically know the command line (well, except for cd, ls, mkdir).
Thanks in advance!
Answer the question
In order to leave comments, you need to log in
the /etc/passwd file contains the home folders of all users,
but if you run the command on behalf of git, you can do this:
mkdir ~/.ssh/
nano ~/.ssh/config
In the shell, ~ expands as the current user's home folder, ~user as the user's home folder: ~/.ssh for the current user, ~user/.ssh for the user user.
We wrote above that you can get information from /etc/passwd, but this is the wrong approach: /etc/passwd is used for local users. If other user sources, such as LDAP, are configured on the system, they will not be in /etc/passwd. It will be correct to use the getent utility, which takes all this into account:
getent passwd | cut -d: -f6
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question