How to create a subversion repository - xcode

I have an apache server running and working with a username and password. I want to create a subversion project - how do I connect to the apache server in Terminal (if I have to) and create the project structure etc before configuring in Xcode?

You can connect to your server using SSH. The command would be:
$> ssh username#192.168.1.100
If your server has a non-standard SSH port of 22, then you'll need to add the port number:
$> ssh -p 1234 username#192.168.1.100
From the examples above, simply substitute 192.168.1.100 with your server's IP address. Substitute "1234" with the SSH Port you're trying to connect to.
Finally, to create a new subversion repository, use the following:
$> sudo svnadmin create /my/svn_path/my_new_project
At this point, I would create the directory structure:
$> mkdir /my/project_path/
$> mkdir /my/project_path/trunk
$> mkdir /my/project_path/branches
$> mkdir /my/project_path/tags
$> mkdir /my/project_path/test
$> mkdir /my/porject_path/etc
Of'course, you don't have to follow the directory structure above. It's just an example. But after you have your directory structure, you'll want to import it to the repository:
$> sudo svn import /my/project_path file:///my/svn_path/my_new_project -m "Initial Import of directory structure"
Once the directory structure has been imported, you should check out a copy of the repository to your local computer/desktop, and start coding.

svnadmin create myproject
Will create you a repository
More complete information about creating repositories can be found here Creating and Configuring Your Repository

Related

Installing golang package from private gerrit repository

I'm trying to use one of projects hosted in gerrit as a dependency in golang.
I installed go-import plugin in gerrit
I added this to .gitconfig:
[url "ssh://myuser#gerrit.example.com:29418"]
insteadOf = https://gerrit.example.com
Now I run:
go get gerrit.example.com/myproject
but it fails with:
go get: module gerrit.example.com/myproject: git ls-remote -q origin in /home/me/go/pkg/mod/cache/vcs/513f491cb527a8cec5b684e8d77254c851f76499e1f725440f98d4e9ad8bbf4f: exit status 128:
fatal: project a/myproject not found
fatal: Could not read from remote repository.
Make sure that global git configuration is not setup with something along the lines:
git config --global url."git#gerrit.example.com:".insteadOf "https://gerrit.example.com"
.gitconfig
[url "git#gerrit.example.com"]
insteadOf = https://gerrit.example.com
For regular use of the git tool, it's convient to have a ~/.ssh/config file set up. In order to do this, run the following commands:
mkdir ~/.ssh
chmod 700 ~/.ssh
touch ~/.ssh/config
chmod 600 ~/.ssh/config
Please note the permissions on the files and directory above are essentail for SSH to work in it's default configuration on most Linux systems.
Then, edit the ~/.ssh/config file to match the following:
Host gerrit.example.com
HostName gerrit.example.com
Port 29418
User USERNAME_HERE
IdentityFile ~/.ssh/id_gerrit_example_com
Please note the spacing in the above file matters and will invalidate the file if it is incorrect.
Where USERNAME_HERE is your gerrit username and ~/.ssh/id_rsa is the path to your SSH private key in your file system. You've already uploaded its public key to gerrit.
Note: I have created this configuration just on assumption since i do not have gerrit setup to test on.

gerrit(version:3.4.1), execute (ssh -p 29418 username#xx.xx.xx.xx gerrit gsql), return(fatal: gerrit: gsql: not found)

Our gerrit version is 3.4.1, when i execute ssh -p 29418 username#xx.xx.xx.xx gerrit gsql, it return fatal: gerrit: gsql: not found.
And when i execute ssh -p 29418 usename#xx.xx.xx.xx gerrit --help, there is no gsql cmd in the returned gerrit instructions list.
How can i operate gerrit database?
Gerrit 3.0 onwards has removed the use of an external database in favor of the git based noteDb and gsql has been removed
As of version 3.x, Gerrit switched the internal database to NotesDB.
You can directly use git to access the notes (which represent the dabase content). For example, to query a change, you could
$ git init
$ git fetch https://gerrit.googlesource.com/gerrit refs/changes/40/329240/meta
$ git log -p FETCH_HEAD
(Example adopted from the NotesDb backend documentation page, where you can find more information as well.)

Realm. ROS upgrade from 1.0 to 2.0 (from Amazon EC2)

Want to upgrade from ROS 1.0 to ROS 2.0
About upgrade steps:(https://realm.io/docs/realm-object-server/latest/#upgrading):
-Guide suggest to create a new folder for the ROS
mkdir -p /srv/new-root # should be an empty dir
And for the key, seems another folder(not related to new-root, called new-ros):
mkdir -p /srv/new-ros/keys
Was this a typo?
Context:
Actually, the folder containing my keys are:
./etc/realm/
And the ROS 1 folder:
/var/lib/realm/object-server-v2/
That is a typo. So, in you case, it is going to be
mkdir -p /var/lib/realm/object-server-v2/keys
cp ./etc/realm/auth.* /var/lib/realm/object-server-v2/keys/
Or you can leave the keys where they are and point to them in the server config:
ros start --private-key ... --public-key ...

Git remote add origin: correct URL and path to add remote repo on the local network

I am trying to set up a remote repository on a Mac on my local network. I have done the following:
Set the sharing privileges on the remote, allowing access to all users (using System Preferences/Sharing)
confirmed that I can SSH to the remote machine
created the repo in the remote directory
created a repo in the local machine directory
executed this command from the local repo directory:
git remote add origin FSM13#192.168.1.51:/Library/FileMaker\ Server/HTTPServer/htdocs/fm-php
when I attempt to push:
git push -u remote origin master
I get these errors:
fatal: 'remote' does not appear to be a git repository
fatal: Could not read from remote repository.
I get the same error using this syntax to set the remote
git remote add origin ssh://FSM13#192.168.1.51/Library/FileMaker\ Server/HTTPServer/htdocs/fm-php
FMS13 is the administrator user account on the remote machine.
What steps might I be missing?
There were three things I needed to do in order to solve this issue:
set up the SSH Keys correctly
initialize the remote repo correctly (using --bare) (this worked but I need to try a few more things. a bare repo does not have any files, just the history: http://www.saintsjd.com/2011/01/what-is-a-bare-git-repository/ )
set the path correctly for the git remote add command
Note that I am using OS X.
This youtube vid and blog post laid it out perfectly:
https://www.youtube.com/watch?v=DDzeiI2yZL8
http://crosbymichael.com/setup-password-less-login-over-ssh.html
SSH Keys:
On the local machine, starting from home directory:
cd .ssh
cat id_rsa.pub
then copy the printed public key. I happened to already have one. The blog post above explains how to create one.
SSH into the remote:
ssh FMS13#192.168.1.51
ls -a
Is there a .ssh directory? If not create one. It needs to be in the home directory.
mkdir .ssh
cd .ssh
then create a keys file
touch authorized_keys
nano authorized_keys
Then paste the key and save the file.
Confirm the install of the key by ssh'ing from the local machine:
ssh FMS13#192.168.1.51
No password was requested, so the key install was successful
Correct repo initialization:
On the remote machine, cd to the desired parent directory and:
mkdir remote-git
cd remote-git
git init --bare
On the local machine from the repo directory, the correct path was as follows to set the remote origin:
git remote add origin ssh://FMS13#192.168.1.51/Users/FMS13/Desktop/remote-git
Where FMS13 is the user on the remote computer, followed by the ip address and then the full path to the directory of the remote repo.
Push to remote:
Then back in the local machine, cd to the repo directory and:
git push origin --all
I have used something similar to this command recently which worked for me:
git remote set-url origin ssh://FSM13#192.168.1.51/USERNAME/REPOSITORY.git
Check out this link for more information. For your case, you may need to be adding the following instead. I have not seen using an IP address with this, though- so refer to the link.
ssh://git#192.168.1.51/USERNAME/REPOSITORY.git
You may also need to generate a new ssh key. Here is a link on that:
ssh-keygen -t rsa -C "your_email#example.com"

Gitolite hook doesn't work

I've set a GIT server on Windows with Cygwin and gitolite as it's described in the article.
On a client Windows machine I use TortoiseGit.
Right after the setup everything works ok. I can clone gitolite-admin repository with TortoiseGit using my SSH key and see the repository content.
But right after I try to push a new content of /conf/gitolite.conf the server is not accessible anymore using my SSH key (it's removed from *authorised_keys* on the server by gitolite).
The new content of gitolite.conf (I would like to add new repository Project):
repo gitolite-admin
RW+ = alexey
repo Project
RW+ = alexey
repo testing
RW+ = #all
What's wrong with it?
The problem was in sshd service environment. See this link for details.
To fix the problem reinstall the service with proper PATH variable setting. To do this on Windows Server 2008 use:
cygrunsrv -R sshd
cygrunsrv -I sshd -d "CYGWIN sshd" -p /usr/sbin/sshd -a "-D" -y tcpip -u cyg_server -w {cyg_server_password} --env "PATH=/usr/local/bin:/usr/bin:/bin:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem"
cygrunsrv -S sshd
If you don't remember cyg_server account password you can rerun ssh-host-config.
To restore access for your public key use:
gl-setup ~/YourKey.pub
After these you can access and modify your gitolite-admin repository remotely.

Resources