Setting up svn+ssh with GitLab
MichaelJCole opened this issue · comments
Hi, I'm very interested in gitlab-ce and git-as-svn.
Unfortunately after getting it all installed, I haven't figured out how to checkout a repo using svn. I can clone using git. I haven't used svn in some time.
$ git clone git@teams.project.com:group/testproject.git
Clones the repo, if-and-only-if I have a ssh public key installed to my user.
Now I'm trying to use svn and I get this:
$ svn checkout svn+ssh://teams.project.com/group/testproject testproject_svn
michael@teams.project.com: Permission denied (publickey).
svn: E170013: Unable to connect to a repository at URL 'svn+ssh://teams.project.com/group/testproject'
svn: E210002: To better debug SSH connection problems, remove the -q option from 'ssh' in the [tunnels] section of your Subversion configuration file.
svn: E210002: Network connection closed unexpectedly
I removed -q from ~/.subversion/config
and tested by making a new transport ssh2 and getting the same error.
If I try to ssh into the server directly, I get this (I'm just flipping switches at this point):
$ ssh -v michael@teams.project.com
OpenSSH_7.6p1 Ubuntu-4ubuntu0.3, OpenSSL 1.0.2n 7 Dec 2017
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to teams.project.com [8.8.8.8] port 22.
debug1: Connection established.
debug1: identity file /home/michael/.ssh/id_rsa type 0
debug1: key_load_public: No such file or directory
debug1: identity file /home/michael/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/michael/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/michael/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/michael/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/michael/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/michael/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/michael/.ssh/id_ed25519-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_7.6p1 Ubuntu-4ubuntu0.3
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.6p1 Ubuntu-4ubuntu0.3
debug1: match: OpenSSH_7.6p1 Ubuntu-4ubuntu0.3 pat OpenSSH* compat 0x04000000
debug1: Authenticating to teams.project.com:22 as 'michael'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
debug1: Host 'teams.project.com' is known and matches the ECDSA host key.
debug1: Found key in /home/michael/.ssh/known_hosts:1
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521>
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering public key: RSA SHA256:xxxxxxxxxxxxxxxxxxxxxxxx /home/michael/.ssh/id_rsa
debug1: Authentications that can continue: publickey
debug1: Trying private key: /home/michael/.ssh/id_dsa
debug1: Trying private key: /home/michael/.ssh/id_ecdsa
debug1: Trying private key: /home/michael/.ssh/id_ed25519
debug1: No more authentication methods to try.
michael@teams.project.com: Permission denied (publickey).
And poking through the logs, I found this (from install?) :
root@ubuntu-18:/var/log/git-as-svn# cat git-as-svn.error.log
2020-04-07T20:39:37,632 ERROR [main] (SystemReader.java:156) - Creating XDG_CONFIG_HOME directory /var/opt/gitlab/.config failed
java.nio.file.AccessDeniedException: /var/opt/gitlab/.config
at sun.nio.fs.UnixException.translateToIOException(UnixException.java:84) ~[?:1.8.0_242]
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) ~[?:1.8.0_242]
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) ~[?:1.8.0_242]
at sun.nio.fs.UnixFileSystemProvider.createDirectory(UnixFileSystemProvider.java:384) ~[?:1.8.0_242]
at java.nio.file.Files.createDirectory(Files.java:674) ~[?:1.8.0_242]
at java.nio.file.Files.createAndCheckIsDirectory(Files.java:781) ~[?:1.8.0_242]
at java.nio.file.Files.createDirectories(Files.java:767) ~[?:1.8.0_242]
at org.eclipse.jgit.util.SystemReader$Default.getXDGConfigHome(SystemReader.java:153) [org.eclipse.jgit-5.6.1.202002131546-r.jar:5.6.1.202002131546-r]
at org.eclipse.jgit.util.SystemReader$Default.openJGitConfig(SystemReader.java:164) [org.eclipse.jgit-5.6.1.202002131546-r.jar:5.6.1.202002131546-r]
at org.eclipse.jgit.util.SystemReader.getJGitConfig(SystemReader.java:381) [org.eclipse.jgit-5.6.1.202002131546-r.jar:5.6.1.202002131546-r]
at org.eclipse.jgit.util.SystemReader.getSystemConfig(SystemReader.java:406) [org.eclipse.jgit-5.6.1.202002131546-r.jar:5.6.1.202002131546-r]
at org.eclipse.jgit.util.SystemReader.getUserConfig(SystemReader.java:354) [org.eclipse.jgit-5.6.1.202002131546-r.jar:5.6.1.202002131546-r]
at org.eclipse.jgit.internal.storage.file.FileRepository.<init>(FileRepository.java:191) [org.eclipse.jgit-5.6.1.202002131546-r.jar:5.6.1.202002131546-r]
at org.eclipse.jgit.internal.storage.file.FileRepository.<init>(FileRepository.java:161) [org.eclipse.jgit-5.6.1.202002131546-r.jar:5.6.1.202002131546-r]
at svnserver.repository.git.GitCreateMode.createRepository(GitCreateMode.java:59) [git-as-svn.jar:?]
at svnserver.repository.git.GitCreateMode$3.createRepository(GitCreateMode.java:46) [git-as-svn.jar:?]
at svnserver.config.GitRepositoryConfig.createGit(GitRepositoryConfig.java:98) [git-as-svn.jar:?]
at svnserver.config.GitRepositoryConfig.create(GitRepositoryConfig.java:89) [git-as-svn.jar:?]
at svnserver.config.GitRepositoryConfig.create(GitRepositoryConfig.java:81) [git-as-svn.jar:?]
at svnserver.config.GitRepositoryConfig.create(GitRepositoryConfig.java:76) [git-as-svn.jar:?]
at svnserver.config.RepositoryListMappingConfig.create(RepositoryListMappingConfig.java:55) [git-as-svn.jar:?]
at svnserver.server.SvnServer.<init>(SvnServer.java:158) [git-as-svn.jar:?]
at svnserver.server.Main.main(Main.java:66) [git-as-svn.jar:?]
2020-04-07T20:39:40,883 ERROR [Thread-12] (LockFile.java:167) - Creating lock file /var/opt/gitlab/.jgitconfig.lock failed
java.nio.file.AccessDeniedException: /var/opt/gitlab/.jgitconfig.lock
at sun.nio.fs.UnixException.translateToIOException(UnixException.java:84) ~[?:1.8.0_242]
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) ~[?:1.8.0_242]
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) ~[?:1.8.0_242]
at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:214) ~[?:1.8.0_242]
at java.nio.file.Files.newByteChannel(Files.java:361) ~[?:1.8.0_242]
at java.nio.file.Files.createFile(Files.java:632) ~[?:1.8.0_242]
at org.eclipse.jgit.util.FS_POSIX.createNewFileAtomic(FS_POSIX.java:431) ~[org.eclipse.jgit-5.6.1.202002131546-r.jar:5.6.1.202002131546-r]
at org.eclipse.jgit.internal.storage.file.LockFile.lock(LockFile.java:165) ~[org.eclipse.jgit-5.6.1.202002131546-r.jar:5.6.1.202002131546-r]
at org.eclipse.jgit.storage.file.FileBasedConfig.save(FileBasedConfig.java:252) ~[org.eclipse.jgit-5.6.1.202002131546-r.jar:5.6.1.202002131546-r]
at org.eclipse.jgit.util.FS$FileStoreAttributes.saveToConfig(FS.java:586) ~[org.eclipse.jgit-5.6.1.202002131546-r.jar:5.6.1.202002131546-r]
at org.eclipse.jgit.util.FS$FileStoreAttributes.lambda$0(FS.java:367) ~[org.eclipse.jgit-5.6.1.202002131546-r.jar:5.6.1.202002131546-r]
at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1604) [?:1.8.0_242]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_242]
2020-04-07T20:39:40,897 ERROR [Thread-12] (FS.java:607) - Cannot save config file 'FileBasedConfig[/var/opt/gitlab/.jgitconfig]'
java.nio.file.AccessDeniedException: /var/opt/gitlab/.jgitconfig.lock
at sun.nio.fs.UnixException.translateToIOException(UnixException.java:84) ~[?:1.8.0_242]
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) ~[?:1.8.0_242]
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) ~[?:1.8.0_242]
at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:214) ~[?:1.8.0_242]
at java.nio.file.Files.newByteChannel(Files.java:361) ~[?:1.8.0_242]
at java.nio.file.Files.createFile(Files.java:632) ~[?:1.8.0_242]
at org.eclipse.jgit.util.FS_POSIX.createNewFileAtomic(FS_POSIX.java:431) ~[org.eclipse.jgit-5.6.1.202002131546-r.jar:5.6.1.202002131546-r]
at org.eclipse.jgit.internal.storage.file.LockFile.lock(LockFile.java:165) ~[org.eclipse.jgit-5.6.1.202002131546-r.jar:5.6.1.202002131546-r]
at org.eclipse.jgit.storage.file.FileBasedConfig.save(FileBasedConfig.java:252) ~[org.eclipse.jgit-5.6.1.202002131546-r.jar:5.6.1.202002131546-r]
at org.eclipse.jgit.util.FS$FileStoreAttributes.saveToConfig(FS.java:586) ~[org.eclipse.jgit-5.6.1.202002131546-r.jar:5.6.1.202002131546-r]
at org.eclipse.jgit.util.FS$FileStoreAttributes.lambda$0(FS.java:367) ~[org.eclipse.jgit-5.6.1.202002131546-r.jar:5.6.1.202002131546-r]
at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1604) [?:1.8.0_242]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_242]
Those two files (/var/opt/gitlab/.config
, /var/opt/gitlab/.jgitconfig.lock
) don't exist in the server.
I'm looking through /etc/git-as-svn.conf
and not seeing anything about gitlab. So I'll reinstall.
I'm not finding any information on how to actually connect to the svn repo. What am I missing?
UPDATE: I've tried this a couple ways and keep getting the permissions errors in the error log: installing before/after configuring the root user.
I looked in /etc/git-as-svn/git-as-svn.conf and it doesn't have the !gitlabUsers{} foo from here
Reading the documentation here, it says "If you’re installing both git-as-svn and Gitlab from Debian packages, no additional actions are required."
Is the software behaving incorrectly or did I get the wrong impression?
UPDATE: Ok, I wrapped the installer in chmods like this and no longer get the file permissions errors.
chmod 777 /var/opt/gitlab
sudo apt-get -y install git-as-svn
sudo apt-get -y install git-as-svn-lfs
chmod 755 /var/opt/gitlab
The git-as-svn.conf
file doesn't have ~gitlabUsers in it.
I am still getting the public key error. I'll take a look at configuring it manually.
UPDATE: FWIW, I'm doing this on a virtual server Ubuntu 18.04 on DigitalOcean (4gb mem)
QUESTION: Where is this file /assets/sshd_config
? It's not in /etc/ssh either?
QUESTION: I installed from deb packages and am not using this with docker. Where is it installed besides /opt/git-as-svn
?
QUESTION: Why does the second /etc/git-as-svn/git-as-svn.conf
listing before the Gitea section not have CHANGE_THIS_TO_SOMETHING_SECRET
in it?
QUESTION: Is this part of a larger Docker project I'm missing? I'm doing this in the VM w/o Docker as I thought was recommended in the docs somewhere.
Uh, there's a lot of stuff here.
java.nio.file.AccessDeniedException: /var/opt/gitlab/.jgitconfig.lock
Just ignore it for now. JGit (Java library that git-as-svn uses internally) tries to write some stuff into configs.
If you’re installing both git-as-svn and Gitlab from Debian packages, no additional actions are required.
That sentence only refers to "it needs to run from the same user as GitLab". I'll rephrase this to make it clearer. You still need to walk through steps in GitLab configuration section if you want to set up git-as-svn to work together with GitLab.
I suggest not going 12.4. GitLab & git-as-svn-svnserve until you have git-as-svn set up to work via svn://
so that you first make sure basic stuff works and then only go advanced.
12. SVN+SSH was contributed by @zeripath (see #199) and to be honest, I have never tried setting that up.
Is this part of a larger Docker project I'm missing?
As far as I know, there are no existing projects that would package git-as-svn in a Docker image. And we only produce deb packages + tarballs for now, as can be seen on Releases page.
Hi @slonopotamus, ok, got it about the docs, my mistake and wishful thinking :-)
Ok, got it about the deb's, that's what I thought till I got to section 12. I really appreciate the implementation detail in the documentation. I read the linked issue and it looks like yall put in alot of work on this. If you think we can complete it, I can help finish it for svn+ssh w/ GitLab. It looks like maybe some experimentation and documentation tweaks is all it needs.
For now, I'll setup just section 4, and update here. If I understand correctly, that get's the svn://
protocol setup, but auth is in cleartext, which doesn't work for my purposes.
I might have missed this in the docs:
- Do git commits get added to the svn revision history?
- What branch does git-as-svn track? Does it know the default branch for the repository config?
- After updating git-as-svn.conf, do I need to run a command to apply the config? (e.g.
gitlab-ctl reconfigure
)?
Thank you!
It looks like maybe some experimentation and documentation tweaks is all it needs.
Yes, most likely the docs on svn+ssh:// need fixes.
If I understand correctly, that get's the svn:// protocol setup, but auth is in cleartext, which doesn't work for my purposes.
Correct. Unfortunately, there's no TLS equivalent for svn:// protocol. If there was, things would be much simpler, without the need to mess with injecting into ssh pipeline.
Do git commits get added to the svn revision history?
That's the whole point of git-as-svn. Git repository is used to store history and you can use it normally from git.
After updating git-as-svn.conf, do I need to run a command to apply the config?
You need to restart git-as-svn via systemd or whatever init system you use. There's no support for SIGHUP or other fancy hot-reload machinery, just good old restart.
What branch does git-as-svn track?
From docs:
- Add
git-as-svn:<branch>
topics to whatever repositories you want to add to git-as-svn via "Settings → General → Topics" in GitLab project settings. For example, addgit-as-svn:master
to exposemaster
branch. If you want to expose more than one branch, add multiplegit-as-svn:<branch>
topics separated by commas.
Hi, so I made some really good progress on the GitLab integration. It's definitely not plug and play, but the project documentation really helped.
The svn clients are Windows, so I'm using PuTTY and TortoiseSVN to test. Assembla has a good article on how to set it up
To test svn+ssh from the client, I've checked these things:
- Test server permissions with
git clone
repo. - Test PuTTY config with
plink git@server.com
plink is a ssh client - Verify topic "git-as-svn:master"
I was getting "Unable to connect to a repository at URL" when trying svn checkout.
I realized I forgot the "git-as-svn:master" topic in GitLab.
After I set the topic, I was unable to connect, so I did a systemctl restart git-as-svn
on the server. Then it worked.
Is there a way to avoid that in the future?
Is this related to #313 ?
Hmm... I believe that git-as-svn discovers changes to GitLab topics without restart (unless something broke with modern GitLab versions). You can look at git-as-svn log and see if there's any activity when you add topics. Note that if you're doing that on already existing repository with many commits, initial repository indexing will take some time. While indexing is performed, git-as-svn continues to operate, but you can't access the branch you've just marked with topic. When you restart git-as-svn, indexing of already marked branches happens during startup.
#313 is only about git-as-svn startup script not waiting until GitLab fully starts.
Snap! I rebooted the server and seem to have wedged it.
I created a new project with a few commits to setup .gitattributes and .gitignore.
Now I'm trying to add a mix of binary and text files:
text.modules
binarywindowsdll.dll
binarywindowsdebug.pdb
text.target
and get this error from TortoiseSVN:
Commit to svn+ssh://...
Commit failed (details follow):
Unable to connect to a repository at URL
'svn+ssh://git@...'
To better debug SSH connection problems, remove the -q option from 'ssh' in the
[tunnels] section of your Subversion configuration file.
Network connection closed unexpectedly
If I try to add an .ini file, I get this error seemingly from the client: Can't set 'svn:eol-style: file 'C:\file.ini' has binary mime type property. .gitattributes
says *.ini text
(among other things)
If I systemctl restart git-as-svn.service
, I get this error:
Committing transaction...:
Error: Commit failed (details follow):
Error: Hook /opt/gitlab/embedded/service/gitaly-ruby/git-hooks/pre-receive failed with
Error: output:
Error: GitLab: API is not accessible
Error: This error was generated by a custom hook script on the Subversion server.
Error: Please contact your server administrator for help with resolving this issue.
Completed!:
I seem to have wedged it. It was working for a minute. I've attached my .gitattributes and .gitignore to see if they are too crazy.
Ok, I tried this on a trivial repo and get the same behavior. README.md
and a .gitattributes
with:
* -text
*.md text
I can use git to pull, commit, and push.
But with TortoiseSVN, I'm still stuck at: Unable to connect to a repository at URL.
UPDATE:
There's nothing in git-as-svn.error.log
. Here's what's in git-as-svn.log
root@ubuntu-18:/var/log/git-as-svn# cat git-as-svn.log
2020-04-11T03:09:51,249 INFO [main] (Main.java:43) - git-as-svn version: 1.25.1, e8e223e0ed2f6f3f0fabf03b3fec333ff2944914
2020-04-11T03:09:52,551 INFO [main] (Log.java:169) - Logging initialized @3440ms to org.eclipse.jetty.util.log.Slf4jLog
2020-04-11T03:09:52,917 INFO [Thread-2] (SSHDirectoryWatcher.java:102) - Processing the authorized_keys file: /var/opt/gitlab/ssh-shadow/authorized_keys
2020-04-11T03:09:52,920 INFO [main] (Server.java:359) - jetty-9.4.26.v20200117; built: 2020-01-17T12:35:33.676Z; git: 7b38981d25d14afb4a12ff1f2596756144edf695; jvm 1.8.0_242-8u242-b08-0ubuntu3~18.04-b08
2020-04-11T03:09:52,950 INFO [Thread-2] (SSHDirectoryWatcher.java:128) - Found 2 keys
2020-04-11T03:09:53,036 INFO [main] (ContextHandler.java:825) - Started o.e.j.s.ServletContextHandler@36a5cabc{/,null,AVAILABLE}
2020-04-11T03:09:53,078 INFO [main] (AbstractConnector.java:330) - Started ServerConnector@4d518b32{HTTP/1.1,[http/1.1]}{localhost:8123}
2020-04-11T03:09:53,080 INFO [main] (Server.java:399) - Started @3972ms
2020-04-11T03:09:56,325 INFO [main] (GitRepositoryConfig.java:100) - [project2/repo3]: using existing storage /var/opt/gitlab/git-data/repositories/@hashed/e7/f6/e7f6c011776e8db7cd330b54174fd76f7d0216b612387a5ffcfb81e6f0919683.git
2020-04-11T03:09:56,944 INFO [main] (GitRepositoryConfig.java:100) - [project/repo2]: using existing storage /var/opt/gitlab/git-data/repositories/@hashed/4e/07/4e07408562bedb8b60ce05c1decfe3ad16b72230967de01f640b7e4729b49fce.git
2020-04-11T03:09:56,979 INFO [main] (GitRepositoryConfig.java:100) - [project/repo1]: using existing storage /var/opt/gitlab/git-data/repositories/@hashed/6b/86/6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b.git
2020-04-11T03:09:57,056 INFO [main] (GitLabProject.java:47) - [project2/repo3]: initing...
2020-04-11T03:09:57,060 INFO [main] (GitBranch.java:211) - [project2/repo3@master]: loading cached revision changes: 3 revisions
2020-04-11T03:09:57,068 INFO [ForkJoinPool.commonPool-worker-1] (GitLabProject.java:47) - [project/repo1]: initing...
2020-04-11T03:09:57,074 INFO [ForkJoinPool.commonPool-worker-1] (GitBranch.java:211) - [project/repo1@master]: loading cached revision changes: 14 revisions
2020-04-11T03:09:57,096 INFO [main] (GitBranch.java:223) - [project2/repo3@master]: 3 cached revision loaded: 35 ms
2020-04-11T03:09:57,103 INFO [ForkJoinPool.commonPool-worker-1] (GitBranch.java:223) - [project/repo1@master]: 14 cached revision loaded: 30 ms
2020-04-11T03:09:57,106 INFO [ForkJoinPool.commonPool-worker-1] (GitLabProject.java:47) - [project/repo2]: initing...
2020-04-11T03:09:57,109 INFO [ForkJoinPool.commonPool-worker-1] (GitBranch.java:211) - [project/repo2@master]: loading cached revision changes: 3 revisions
2020-04-11T03:09:57,113 INFO [ForkJoinPool.commonPool-worker-1] (GitBranch.java:223) - [project/repo2@master]: 3 cached revision loaded: 5 ms
2020-04-11T03:09:57,122 INFO [main] (WebServer.java:129) - Registered servlet for path: /_hooks/gitlab
2020-04-11T03:09:57,363 INFO [SvnServer] (SvnServer.java:187) - Ready for connections on /0.0.0.0:3690
2020-04-11T03:11:05,680 INFO [SvnServer-thread-2] (SvnServer.java:207) - New connection from: /127.0.0.1:47716
2020-04-11T03:11:05,803 INFO [SvnServer-thread-2] (SvnServer.java:325) - Client: SVN/1.13.0 (x64-microsoft-windows)
2020-04-11T03:11:05,808 INFO [SvnServer-thread-2] (SvnServer.java:273) - Connection from /127.0.0.1:47716 closed
2020-04-11T03:11:07,753 INFO [SvnServer-thread-2] (SvnServer.java:207) - New connection from: /127.0.0.1:47718
2020-04-11T03:11:07,867 INFO [SvnServer-thread-2] (SvnServer.java:325) - Client: SVN/1.13.0 (x64-microsoft-windows)
2020-04-11T03:11:07,868 INFO [SvnServer-thread-2] (SvnServer.java:273) - Connection from /127.0.0.1:47718 closed
2020-04-11T03:11:10,112 INFO [SvnServer-thread-2] (SvnServer.java:207) - New connection from: /127.0.0.1:47722
2020-04-11T03:11:10,207 INFO [SvnServer-thread-2] (SvnServer.java:325) - Client: SVN/1.13.0 (x64-microsoft-windows)
2020-04-11T03:11:10,209 INFO [SvnServer-thread-2] (SvnServer.java:273) - Connection from /127.0.0.1:47722 closed
2020-04-11T03:11:55,663 INFO [SvnServer-thread-2] (SvnServer.java:207) - New connection from: /127.0.0.1:47732
2020-04-11T03:11:55,792 INFO [SvnServer-thread-2] (SvnServer.java:325) - Client: SVN/1.13.0 (x64-microsoft-windows)
2020-04-11T03:11:55,796 INFO [SvnServer-thread-2] (SvnServer.java:273) - Connection from /127.0.0.1:47732 closed
2020-04-11T03:11:57,767 INFO [SvnServer-thread-2] (SvnServer.java:207) - New connection from: /127.0.0.1:47734
2020-04-11T03:11:57,861 INFO [SvnServer-thread-2] (SvnServer.java:325) - Client: SVN/1.13.0 (x64-microsoft-windows)
2020-04-11T03:11:57,864 INFO [SvnServer-thread-2] (SvnServer.java:273) - Connection from /127.0.0.1:47734 closed
2020-04-11T03:11:59,918 INFO [SvnServer-thread-2] (SvnServer.java:207) - New connection from: /127.0.0.1:47736
2020-04-11T03:12:00,020 INFO [SvnServer-thread-2] (SvnServer.java:325) - Client: SVN/1.13.0 (x64-microsoft-windows)
2020-04-11T03:12:00,035 INFO [SvnServer-thread-2] (SvnServer.java:273) - Connection from /127.0.0.1:47736 closed
2020-04-11T03:17:30,632 INFO [SvnServer-thread-3] (SvnServer.java:207) - New connection from: /127.0.0.1:47786
2020-04-11T03:17:30,754 INFO [SvnServer-thread-3] (SvnServer.java:325) - Client: SVN/1.13.0 (x64-microsoft-windows)
2020-04-11T03:17:30,755 INFO [SvnServer-thread-3] (SvnServer.java:273) - Connection from /127.0.0.1:47786 closed
2020-04-11T03:17:33,133 INFO [SvnServer-thread-3] (SvnServer.java:207) - New connection from: /127.0.0.1:47788
2020-04-11T03:17:33,233 INFO [SvnServer-thread-3] (SvnServer.java:325) - Client: SVN/1.13.0 (x64-microsoft-windows)
2020-04-11T03:17:33,241 INFO [SvnServer-thread-3] (SvnServer.java:273) - Connection from /127.0.0.1:47788 closed
2020-04-11T03:17:35,096 INFO [SvnServer-thread-3] (SvnServer.java:207) - New connection from: /127.0.0.1:47790
2020-04-11T03:17:35,203 INFO [SvnServer-thread-3] (SvnServer.java:325) - Client: SVN/1.13.0 (x64-microsoft-windows)
2020-04-11T03:17:35,204 INFO [SvnServer-thread-3] (SvnServer.java:273) - Connection from /127.0.0.1:47790 closed
root@ubuntu-18:/var/log/git-as-svn#
LOL, I am so bad at this. I didn't generate a new API key after reinstalling explains one version of the error, although I'm still getting it.
Pro-tip: this section talks about two methods for authentication: authorized_keys
file and sshd's AuthorizedKeysCommand
. Note that the GitLab Omnibus 12 (the debian packages) have switched to AuthorizedKeysCommand
, so the second configuration example is more appropriate.
This sshd_config recommended by GitLab applies the custom script only to the git user which seems a bit more secure.
Ok, I think I got svn+ssh setup.
I'm still getting a GitLab: API is not accessible
issue with GitLab's pre-receive hook, but I'll file another issue for that if I can't figure it out.