[cs631apue] Regarding git authentication with cs631apue.netmeister.org

Bradford Smith bsmith8 at stevens.edu
Mon Oct 17 19:42:59 EDT 2016


When trying to do the in class git example tonight many of us had the issue of
the system asking for our internal user passwords. After a bit of thought, I
have realized this must be because we were on cs631apue.netmeister.org when we
tried to do the git clone. The reason it failed to authenticate us is because
system has our ssh keys for authentication but our users on the system do not
have the ssh keys, which meant that git couldn't use the ssh key to authenticate
with the server.

Running the git clone command from the Linux Lab machines will authenticate with
git without issues. If you wish to also clone the git repository on the
netmeister machine there are two possible solutions that I can think of:

    1. Copy your ssh key to the netmeister machine:
        - from the Linux Lab the command:
        `scp ~/.ssh/<your ssh key file> <user>@cs631apue.netmeister.org:~/.ssh/`

        - see `man scp`

        - this will allow git to authenticate with the server using your ssh key

        - an afterthought as I'm writing this, you will probably need to scp
        both the public and private key files for this to work


    2. Because the git repository is local to the machine you are on you can use
    the file protocol in your git clone command
        - this makes the command:
            `git clone file:///usr/local/apue/<your group>`

        - this will not require any authentication because we are already
        authenticated to the machine and have permissions on the directory of
        the git repository

        - I think this is the better solution to go with and it is the one I am
        using

- Bradford


More information about the cs631apue mailing list