2

I want to checkout the glassfish svn with subgit 2.0.2.

I added

ssh-rsa blabla user@host

in the user account settings of java.net. The key is stored locally under ~/.ssh/authorized_keys and id_rsa.user@host.pub.

I set up subgit with subgit configure --svn-url svn+ssh://javauser@svn.java.net/glassfish~svn /path/to/folder and changed /path/to/folder/config to

[core]
    repositoryformatversion = 0
    filemode = true
    bare = true
    logallrefupdates = false
    bigFileThreshold = 1m

[svn]
    url =  svn+ssh://javauser@svn.java.net/glassfish~svn 

[auth "default"]
    sshKeyFile = /home/user/.ssh/id_rsa.user@host.pub

subgit install /path/to/folder fails due to error: svn: E170001: Authentication required for 'javauser@svn+ssh://svn.java.net'.

Edit 1 and 3: I want to checkout with svn+ssh because with svn and https I'm getting

  • error: svn: E175002: PROPFIND of '/': 405 Method Not Allowed (https://svn.java.net) or
  • error: svn: E175002: PROPFIND of '/svn/glassfish~svn': 502 Proxy Error (https://svn.java.net)

after different periods of time (sometime immediately, sometimes after days (it's a large checkout...), but I never managed to checkout/clone completely), with http I'm getting relocation error because the server enforces https this way.

Edit 2: When I invoke ssh javauser@svn.java.net and ssh javauser@java.net I'm getting Permission denied (publickey). and I'm not sure whether this is intended, because I guess I shouldn't be able to login on the java.net server or whether the key isn't working.

EDIT 3: java.net seems to let all REPORT requests (I'm not too familiar with svn, maybe that's very rare and relies on some extension of underlying protocoll which get stuck in a misconfigured firewall - why else could it timeout always on REPORT requests?) making it impossible to checkout even with svn.

Kalle Richter
  • 8,008
  • 26
  • 77
  • 177

1 Answers1

0

It looks like subgit isn't using your SSH key for the authorization.

I guess you have to specify the auth value for the svn configuration, although one could assume that it is using the default by default. Try the following:

[svn]
    url = svn+ssh://javauser@svn.java.net/svn/glassfish~svn 
    auth = default

Update: I just realized that you are using the wrong URL. It has to be:

svn.java.net/svn/glassfish~svn

Update #2:

If you don't want to contribute to the repository an anonymous checkout is sufficient. Try the following configuration:

[svn]
    url = https://svn.java.net/svn/glassfish~svn
    auth = default

[auth "default"]

I tried that and it started, but it looks like it will take ages to complete. Maybe it helps if only checkout something more specific like the GlassFish 4.0 branch (change the url to https://svn.java.net/svn/glassfish~svn/branches/4.0/).

If this also doesn't work for you another option is to checkout the repository with svn (like it is supposed to). The following should work (you need an svn client for that):

svn checkout https://svn.java.net/svn/glassfish~svn /path/to/something

You can also do a local import of the svn checkout with subgit. Instructions can be found in the SubGit Book for Local Mode.

See also:

Community
  • 1
  • 1
unwichtich
  • 13,712
  • 4
  • 53
  • 66
  • Thanks for you input, but that's not it. I edited the tail of the question. Maybe that inspires to some new ideas :) – Kalle Richter Jul 13 '14 at 14:24
  • about your update: The checkout URL for `https`, `http` and `svn` is `://svn.java.net/svn/glassfish~svn`, but access via SSH is without `svn` subdirectory `svn+ssh://javauser@svn.java.net/glassfish~svn` [https://java.net/projects/glassfish/sources/svn/show] - anyway, both don't work! – Kalle Richter Jul 13 '14 at 16:05
  • Do you want to contribute to the repository? Otherwise an anonymous checkout could be sufficient. – unwichtich Jul 13 '14 at 17:49
  • No, I don't. The anonymous checkout fails due to `PROPFIND` error described in my (updated) question (marking the update now) (I assume there's no other protocol besides `http`, `https`, `svn` and `svn+ssh`) – Kalle Richter Jul 13 '14 at 19:02
  • 1
    Thanks! I tried once to checkout 4.0, but it seems to have so much redundancy with the main branch (I guess I mean trunk in svn terms) that it takes also days, but that's no problem. I guess the only issue is the `PROPFIND` issue which occurs during anonymus checkout. – Kalle Richter Jul 13 '14 at 20:24
  • Correct url is: svn+ssh://svn.java.net/glassfish~svn – dmatej Aug 18 '14 at 21:55