Arch: Problem reconnecting to my gitlab project.
by Basher52 from LinuxQuestions.org on (#58YX6)
Hi :(
As I can't fine the solution to my problem or that I'm doing somehting wrong I'll ask here.
OS: Arch 200901 with some updates after that.
Running under virtualbox as of now but that's just as I'm trying something out, or as I thought I would until this problem again :(
Last time I had this problem I tried to fix it for a couple of hour but as I was in hurry I just nuked my gitlab project and restarted but this time I need to know how to fix this as I will occur on every machine I install later on... I think.
This time I've read and tested 30 or more different "solutions" the last week or so, so I have no idea what state I'm in but I'll list some info how it is now and if you need more, just ask.
I'm using ssh for this but if https is a requirement just lemme know.
The repo is as of now private but will be open when I get things in order and such even though it ain't much.
First I gotta say that I use a BARE repo as this is SO!!! much easier to handle instead of using symlinks and such.
Got this from: DistroTube @UT and it's a lifesaver :p
I'm using an alias for this and it's as follows:
Code:alias bgit='/usr/bin/git --git-dir=$HOME/dotfiles/ --work-tree=$HOME'The error I get when trying to push is:
Code:$bgit push
fatal: The current branch master has no upstream branch.
To push the current branch and set the remote as upstream, use
git push --set-upstream origin mastertrying that suggestion...:
Code:$git push --set-upstream origin master
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
Some info:
Code: $bgit status
On branch master
No commits yet
Changes to be committed:
(use "git rm --cached <file>..." to unstage)
new file: .bash_aliases
new file: .bash_extension
new file: .bashrc
new file: .scrc
new file: .screenrc
new file: .vimrc
new file: archb52.ini
new file: archb52.sh
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: .vimrc
Untracked files not listed (use -u option to show untracked files)Code:$bgit remote show
originCode:$bgit remote show origin
Enter passphrase for key '/home/basher52/.ssh/id_ed25519':
* remote origin
Fetch URL: git@gitlab.com:Basher52/dotfiles.git
Push URL: git@gitlab.com:Basher52/dotfiles.git
HEAD branch: master
Remote branch:
master tracked.gitconfig
Code:$cat ~/.gitconfig
[user]
mail = ********
name = Basher52
[url "ssh://git@gitlab.com/"]
insteadOf = https://gitlab.com~/dotfiles/config
Code:$cat dotfiles/config
[core]
repositoryformatversion = 0
filemode = true
bare = true
[status]
showUntrackedFiles = no
[remote "origin"]
url = git@gitlab.com:Basher52/dotfiles.git
fetch = +refs/heads/*:refs/remotes/origin/*The problem is that as I installed this virtual machine I did some changes to these dotfiles and I want them uploaded to my repo and the question now is...
How do I "reconnect" to a project that already exist, I KNOW it's possible otherwise people wouldn't use it but I'm probably to 'stupid' to get it :p
Preferably I would like a HowTo from the moment I just installed a clean Arch as that will be the most cases but yeah, a solution to this too if possible. If the first is required then I'll just nuked the project again and start over... again.
Please help an old man ;)


As I can't fine the solution to my problem or that I'm doing somehting wrong I'll ask here.
OS: Arch 200901 with some updates after that.
Running under virtualbox as of now but that's just as I'm trying something out, or as I thought I would until this problem again :(
Last time I had this problem I tried to fix it for a couple of hour but as I was in hurry I just nuked my gitlab project and restarted but this time I need to know how to fix this as I will occur on every machine I install later on... I think.
This time I've read and tested 30 or more different "solutions" the last week or so, so I have no idea what state I'm in but I'll list some info how it is now and if you need more, just ask.
I'm using ssh for this but if https is a requirement just lemme know.
The repo is as of now private but will be open when I get things in order and such even though it ain't much.
First I gotta say that I use a BARE repo as this is SO!!! much easier to handle instead of using symlinks and such.
Got this from: DistroTube @UT and it's a lifesaver :p
I'm using an alias for this and it's as follows:
Code:alias bgit='/usr/bin/git --git-dir=$HOME/dotfiles/ --work-tree=$HOME'The error I get when trying to push is:
Code:$bgit push
fatal: The current branch master has no upstream branch.
To push the current branch and set the remote as upstream, use
git push --set-upstream origin mastertrying that suggestion...:
Code:$git push --set-upstream origin master
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
Some info:
Code: $bgit status
On branch master
No commits yet
Changes to be committed:
(use "git rm --cached <file>..." to unstage)
new file: .bash_aliases
new file: .bash_extension
new file: .bashrc
new file: .scrc
new file: .screenrc
new file: .vimrc
new file: archb52.ini
new file: archb52.sh
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: .vimrc
Untracked files not listed (use -u option to show untracked files)Code:$bgit remote show
originCode:$bgit remote show origin
Enter passphrase for key '/home/basher52/.ssh/id_ed25519':
* remote origin
Fetch URL: git@gitlab.com:Basher52/dotfiles.git
Push URL: git@gitlab.com:Basher52/dotfiles.git
HEAD branch: master
Remote branch:
master tracked.gitconfig
Code:$cat ~/.gitconfig
[user]
mail = ********
name = Basher52
[url "ssh://git@gitlab.com/"]
insteadOf = https://gitlab.com~/dotfiles/config
Code:$cat dotfiles/config
[core]
repositoryformatversion = 0
filemode = true
bare = true
[status]
showUntrackedFiles = no
[remote "origin"]
url = git@gitlab.com:Basher52/dotfiles.git
fetch = +refs/heads/*:refs/remotes/origin/*The problem is that as I installed this virtual machine I did some changes to these dotfiles and I want them uploaded to my repo and the question now is...
How do I "reconnect" to a project that already exist, I KNOW it's possible otherwise people wouldn't use it but I'm probably to 'stupid' to get it :p
Preferably I would like a HowTo from the moment I just installed a clean Arch as that will be the most cases but yeah, a solution to this too if possible. If the first is required then I'll just nuked the project again and start over... again.
Please help an old man ;)