NetBeans, Subversion, and remote ssh server

Here are a few tips on using Subversion with NetBeans. In my case the Subversion was setup on a system that with ssh tunnel, so we'll go over authentication settings as well. My development environment is Mac OS X 10.5.8 with NetBeans 6.8. The remote system is running Solaris 10 x64.

1. We'll start with SSH related details to enable permission to the ssh server. First, let's create a PKI key-pair and then upload the public key to the remote svn server. You can follow this instructions, and here is the output on Mac:

marina1s-macbook-pro-2:~ userx$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key
(/Users/userx/.ssh/id_rsa): 
Enter passphrase (empty for no
passphrase): 
Enter same passphrase again: 
Your identification has been saved in
/Users/userx/.ssh/id_rsa.
Your public key has been saved in
/Users/userx/.ssh/id_rsa.pub.
The key fingerprint is:
42:d0:f4:86:ad:0a:8e:a3:f7:ae:5e:c0:2e:ab:cb:03
userx@marina1s-macbook-pro-2.local
The key's randomart image is:


2. Now copy the public key of the generated pair to the remote location:

scp .ssh/id_rsa.pub user@server:

You can check the success of this operation by validating the files on the remote system.

3. In the NetBeans, select your project and in the right-mouse-click drop down menu select Versioning → Subversion. You will then be prompted to enter details of the Subverion repository URL, i.e. svn+ssh url, and the account info for the SSH tunnel. Enter the corresponding values such as:

svn+ssh://hostIP/export/home/myaccount/svnroot
ssh -l svnuser -i /Users/userx/.ssh/id_rsa


4. Locale Error

After passing credentials, and submitting the Next button you may run into this error. With NetBeans IDE, there is a limitation (or a bug) that relates to the Subversion Locale error:

cannot set LC_CTYPE locale
environment variable LANG is en_US.UTF-8
please check that your locale name is correct

After I tried a few workarounds mentioned online and the error message still persisted, I manually installed the latest version of Subversion 1.6 from here and changed the PATH as the default location of the Subversion library is under /usr/bin. You can change the PATH within the NetBeans IDE by navigating to NetBeans -> Preferences (Options for other OSs), selecting Miscellaneous, and Versioning.

NetBeans Subversion PATH

You may also check Manage Connection Settings that should capture your url and account settings that you specified in the previous step.

5. Now you should be able to proceed with importing, checking in and out your source code. You can find more details on using Subversion with NetBeeans from this article. It's important to note that you cannot create a brand new repository from within the IDE. You need to create the repository on the remote server prior to importing your code.


Comments:

good sharing !!!
<a href=“http://www.airmax-shox.com/en/category/7-air-max-90.html”>nike air max</a>

Posted by har19 on March 15, 2010 at 01:28 PM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Marina Fisher is a member of Oracle ISV Engineering team, posting blogs around industries, technologies, and applications she is working with.

Search

Categories
Archives
« July 2015
SunMonTueWedThuFriSat
   
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
 
       
Today