Get Started

SubGit for Gogs

SVN to Gogs How-To

1. Setting up database

Gogs requires a database to work. This chapter describes how to set MySQL Community Server 5.5.53 up, so it would maintain Gogs.

1.1 Download MySQL

Download MySQL Community Server 5.5.53. Download executable file and launch, or if you have downloaded archived version, unpack it and then launch executable file.

up

1.2 Install MySQL

Run executable file and proceed installation until installation program will ask you to chose setup type:

MySQL setup type

Press “Typical” button and continue with installation until you will see window reporting successful installation:

MySQL setup complete

Make sure that the box “Launch the MySQL Instance Configuration Wizard” is checked and press “Finish”.

up

1.3 Configure MySQL

After pressing “Finish” button, Configuration Wizard will pop up. Press “Next” button:

MySQL server chose

Chose the server you just installed and then “Next” button:

MySQL configuration option chose

Chose “Standard Configuration” and then “Next” button yet again:

MySQL windows option setup

Make sure that you have checked the box “Include Bin Directory in Windows Path” at this step and then press “Next” button.

MySQL security options

Uncheck “Modify Security Settings” box (Do not worry, custom password will be set later) and proceed in the Configuration Wizard until you hit “Finish” button.

MySQL configuration finish

up

1.4 Setup the database

Run command line (cmd) and enter the line: mysql -u root –password=root

MySQL cmd login

You will be connected to MySQL Monitor. To change the password write the following line:

SET PASSWORD FOR 'root'@'localhost' = PASSWORD('custompassword');

Where ‘custompassword’ is the password that you chose.

MySQL cmd password setup

Enter the line:

show databases;

(Make sure you have put semicolon(;) in the end of the line) to see the list of databases.

MySQL cmd show databases

Create a database for Gogs with the line:

create database gogs;

MySQL cmd create database

To check if database was created write the line

show databases

again.

MySQL cmd check database

If “gogs” database is present in the list, you are good to go. Enter “exit” and close the cmd.

up

2. Installing Gogs

This chapter reviews installation of Gogs.

up

2. Download Gogs

Download Gogs and unpack into the its working directory.

up

2.3 Set Gogs up

Open command prompt window and navigate to directory where you have unpacked Gogs and run the following command:

gogs web

gogs run

this will launch Gogs server, to proceed with an installation, enter the following web-address to address bar of your browser: 127.0.0.1:3000

address bar

If you have done everything right, a configuration page will show up:

config page

Write the password of your database in the “Password” field and feel free to configure the Gogs at your discretion, but if you do not mind default settings, then simply hit “Install Gogs” button.

configuring the page

up

2.3 Create a repository

After pressing “Install Gogs” button you will be redirected to login page. If you have not entered administrator accounts data on configuration page, simply register an account, it will be granted administrators attributes automatically.

login page

Next, hit the “Plus” button in “My Repositories” window:

new repository button

Here, enter the data of your new repository and hit “Create Repository” button.

new repository

up

3. Setting SubGit up

This final chapter will describe the way to synchronize Gogs repository with SubGit.

up

3.1 Download SubGit

Download SubGit and unpack it into it’s working directory.

up

3.2 Set SubGit up

Open command prompt window and navigate to the “bin” directory inside of the directory where you have unpacked SubGit:

cmd page

And run the following command:

subgit-3.3.1/bin/subgit configure --layout auto SVN_URL REPOS.GIT

where SVN_URL is an url leading to svn repository and REPOS.GIT is a path leading to git repository, created with Gogs (By default Gogs repositories are locating at C:\Users\%username%\gogs-repositories\%gogsAccountname%).

Example:

subgit configure --layout auto file:///E:\SVN C:\Users\Kiseki\gogs-repositories\kiseki\tmate.github.io.git

subgit setup example

and then run the following command:

subgit-3.3.1/bin/subgit install REPOS.GIT

where REPOS.GIT is (Yet again) a path leading to git repository, created with Gogs.

Example:

subgit install C:\Users\Kiseki\gogs-repositories\kiseki\tmate.github.io.git

subgit installation example

If application reports about successful installation, that means that subgit now synchronizes your SVN and Gogs repositories.

subgit successful report

Our congratulations on successful installation of Gogs :)

up

Contact us

Please fill out all fields.


By clicking on this button you agree to provide us your personal data for the purpose of technical support for you. Please read our Privacy policy for more details.

Thank you for contacting us!
We will get back to you soon.

We are sorry, something went wrong. Please try again or contact us.