User Tools

Site Tools


access_sdf_gitea_using_ssh_keys

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
access_sdf_gitea_using_ssh_keys [2022/02/07 21:32] – clarified some of the language about the server setup. jquahaccess_sdf_gitea_using_ssh_keys [2022/02/07 21:37] (current) jquah
Line 1: Line 1:
 Futurile spent some time investigating and eventually got to the bottom of it. Futurile spent some time investigating and eventually got to the bottom of it.
  
-Useful information is that the gitea server (git.sdf.org) is hosted on ma.sdf.org. After your gitea account is created, it will reside on ma.sdf.org at /meta/gitea/gitea-repositories/<your userid>/<git-repository-name>.git+Useful information is that the Gitea server (git.sdf.org) is hosted on ma.sdf.org. After your Gitea account is created, it will reside on ma.sdf.org at ''/meta/gitea/gitea-repositories/<your userid>/<git-repository-name>.git''.
  
   - Create Gitea account as instructed in [[hosted_git_repos_-_gitea_on_sdf|Hosted git repos]].   - Create Gitea account as instructed in [[hosted_git_repos_-_gitea_on_sdf|Hosted git repos]].
Line 13: Line 13:
     * The Gitea server is running on the system as the 'git' user, so you need to ssh into it using 'git' as the username (rather than your normal sdf username).     * The Gitea server is running on the system as the 'git' user, so you need to ssh into it using 'git' as the username (rather than your normal sdf username).
     * The Gitea server is running on port 2222, so our test of public key authentication will specify this port manually. (It is possible for the server to switch seamlessly to port 2222 whenever the 'git' username attempts an SSH connection, but this option has not been configured at present.)     * The Gitea server is running on port 2222, so our test of public key authentication will specify this port manually. (It is possible for the server to switch seamlessly to port 2222 whenever the 'git' username attempts an SSH connection, but this option has not been configured at present.)
-    * At the command line, test that your newly-uploaded SSH key is recognized by Gitea. A dedicated stanza for git.sdf.org in $HOME/.ssh/config will load the key automatically, or you can use ssh-agent as shown below. +    * At the command line, test that your newly-uploaded SSH key is recognized by Gitea. A dedicated stanza for git.sdf.org in $HOME/.ssh/config will load the key automatically, or you can use ssh-agent as shown below.<code>$ keychain ~/.ssh/<the-ssh-key-in-gitea> 
-<code>$ keychain ~/.ssh/<the-ssh-key-in-gitea> +$ ssh -vvv git@git.sdf.org -p 2222</code>
-    $ ssh -vvv git@git.sdf.org -p 2222</code>+
     * You'll see a load of output, if it's successful you'll see:<code>     * You'll see a load of output, if it's successful you'll see:<code>
 Offering public key: <key>  Offering public key: <key> 
 <more output> <more output>
 debug1: Authentication succeeded (publickey). debug1: Authentication succeeded (publickey).
-Authenticated to git.sdf.org ([205.166.94.33]:2222).</code> +Authenticated to git.sdf.org ([205.166.94.33]:2222).</code> The server is not configured to allow shell access over this SSH connection, so the test will terminate automatically and return you to your local machine.
-      The server is not configured to allow shell access over this SSH connection, so the test will terminate automatically and return you to your local machine.+
   - Set up your repository one of two ways:   - Set up your repository one of two ways:
     - Use the repository via git     - Use the repository via git
-      * The Gitea web page for any empty repository you create will show you the commands for accessing it via ssh. (Once content is uploaded, this information disappears from the landing page of the repository.) Because Gitea is actually running on port 2222, you have to add this to the command line provided.<code> +      * The Gitea web page for any empty repository you create will show you the commands for accessing it via ssh. (Once content is uploaded, this information disappears from the landing page of the repository.) Because Gitea is actually running on port 2222, you have to add this to the command line provided.<code>$ git pull git@git.sdf.org:2222/<your-sdf-id>/<repository-name>.git 
-  $ git pull git@git.sdf.org:2222/<your-sdf-id>/<repository-name>.git +$ git pull git@git.sdf.org:2222/futurile/futurile-www.git</code> ''or instead''
-  $ git pull git@git.sdf.org:2222/futurile/futurile-www.git</code> ''or instead''+
     - Import an existing repository     - Import an existing repository
       * I had an existing repository that I wanted to now upload into gitea. To do that we add a new remote.<code>       * I had an existing repository that I wanted to now upload into gitea. To do that we add a new remote.<code>
Line 33: Line 30:
 $ git push upstream master</code> $ git push upstream master</code>
       * For my own reasons I've called the remote 'master' whereas most instructions call it 'origin' - but it's the same thing.       * For my own reasons I've called the remote 'master' whereas most instructions call it 'origin' - but it's the same thing.
-  - Check output in gitea +  - Check output in Gitea 
-    * You should see output on the command-line, and when you login to the gitea web app you can verify that the files were uploaded.+    * You should see output on the command-line, and when you login to the Gitea web app you can verify that the files were uploaded.
access_sdf_gitea_using_ssh_keys.1644269551.txt.gz · Last modified: 2022/02/07 21:32 by jquah