Gogs setup & config
see gogs git server for main install page
first config
surf to http://80.209.239.124:3000
first time vist gogs site , at least 1 user must be created and config set up :
db type = sqlite
path := /home/wmftp/main/gogs/gogs.db (use absolute path !)
app name := CNM_VCS
repos root path := /home/wmftp/main/repos
user := ~~wmftp~~ (insufficient permissions) => root
gogs user (first created becomes gogs admin) :
ward ( login with ward or w-j-m@gmx.com ) -- tEn1*.GitHub
create a host file entry
edit the /etc/hosts file (as root , sudo is not sufficient)
add : 80.209.239.124 CNM_VCS
create a new repository via command line with gogs
- log on to gogs ( http://80.209.239.124:3000 ) using ward
- create a repo
- get repo url ( http://localhost:3000/ward/notes.IT.git , etc)
on laptop :
go the directory , this will become the working dir
I use the method of separating working dir and local repo
cd /mnt/data/PKS/nota/notes.IT/
touch README.md
~~git init~~
git init --separate-git-dir /mnt/data/repos/notes.IT
# git add README.md
git add --all
git commit -m "first commit"
git remote add origin http://localhost:3000/ward/notes.IT.git # error : do not use localhost
git push -u origin master
=> Failed to connect to localhost port 3000: Connection refused => cofig in git folder adapted => ok
asks for use == gogs use = ward or email
rectify localhost error of above by an edit to “config” file in the .git folder
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "origin"]
url = http://localhost:3000/ward/notes.IT.git => http://80.209.239.124:3000/ward/notes.IT.git
fetch = +refs/heads/*:refs/remotes/origin/*
now create
cd /mnt/data/PKS/nota/notes.wm/ # cd /mnt/data/creata/scripta/
touch README.md
git init --separate-git-dir /mnt/data/repos/notes.wm # /scripta
git add --all
git commit -m "first commit"
git remote add origin http://80.209.239.124:3000/ward/notes.wm.git # /scripta.git
git push -u origin master
to push an existing repository from the command line :
git remote add origin http://:3000/ward/notes.IT.git
git push -u origin master