so I have a self-hosted Gitlab, I use Git kraken pro and git for windows to enable the LFS component.
I'm having the issue where when I push to my repository git kraken asks for authentication. (Username and password.) How ever I have no such issue when I pull the data, it will just do the job. And the same is for the LFS, I can pull but not push the data without a password.
Here is the set up:
I have not been successful in setting up the ssh keys at this point as it refuses to use them and I'm still trying to work that issue out.
I have pressed the "remember me" option for the pop up and that doesn't seem to work
I have set up the access token and that all works.
The GitLab ce is installed on a Linux OS and I am connecting to it via 4 windows PC's using git kraken (all on pro licenses).
Git lab CE is updated to the latest version and same for git Kraken
Obviously, the preferred method of connection to the git is SSH but it refuses to work. I have tried the git kraken's version of ssh and manually creating and installing the keys using cmd line.
When I enter the U/P to push the data it only works for that single push even if I don't restart git lab. Every single time I need to place a user name and password and this is tiresome.
What I'm asking is, how can I fix this? This is my first full-fledged self-hosted git, and I've learned things on the fly, I do have normal git experience but the set up for the self-hosted is a lot more involved compared to just using git itself.
The reason I am self-hosting is, cost. My repos are GB in size and I have many. So, I need to have my own set up to avoid having those kinds of costs.
How can this be fixed?
When I enter the U/P to push the data it only works for that single push even if I don't restart git lab. Every single time I need to place a user name and password and this is tiresome.
Double-check if your GitKraken is actually using an SSH URL (git#yourServer:user/repo), as a username/password should only work for HTTMS URL (https://yourServer/user/repo)
Check the SSH port is reachable from your windows:
curl -v telnet://yourServer:22
If it does not connect, double-check your Omnibus installation on Linux, making sure the SSH daemon is started and active, using the right sshd_config.
The OP Maize adds in the comments:
A complete reinstall and removal of setting in GitKraken solved the issue.
Previous uninstalled seems to of kept the settings, so when I removed those, it sorted itself out.
Related
Right now I use scp-action to copy some files to one server.
How secure is this method?
What are the alternatives to using GitHub Actions, I was thinking of running a custom action of scp and setting up a local runner on my side.
One other alternative is to configure a bare repository on your server, and adding it as a second remote on your local repository.
Now every time you want to deploy code to your server, you push to this remote. You then create a git hook on your server that fires post-push, and automatically executes a script that restarts a service, for example.
Read more here
For me, I am having a hard time choosing between these two alternatives because I have some unanswered questions :
for github actions, how secure is the SSH key being ran from a github runner ? and given that my codebase is huge, isn't it a bit overkill to scp all my files after a hotfix commit where I changed only 1 or 2 files ?
for git bare repo: would the size of the git folder be a problem ? and how to secure my server so it would not serve the .git folder ?
While trying to clone a repository from gitlab, I ran into the following error:
git clone <USER>#<URL>:<path_to_project.git>
Cloning into 'xxx'...
<USER>#<URL>'s password:
fatal: 'root/acl-labl-website.git' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
I tried both the SSL and HTTP address, and both got this similar error. Not sure what it meant, and after many tries involving modifying config files (from gitlab, nginx, apache checking redirects, etc.), I found the very simple answer. Still not sure why my other method didn't work, but I found that first adding your public ssh key to gitlab (through the GUI), then using the same command as above, but using git instead of my username:
git clone git#<URL>:<repo_path>.git
worked. I.e. generate your id_rsa.pub as explained here: https://docs.gitlab.com/ce/ssh/README.html , copy this to your ssh keys (which in my case was one of the tabs in the gitlab GUI; I've done this before for git as well, where it's also to be found somewhere in your user settings). In my case I had to run
ssh-add
still before it worked, but with a colleague it worked without as well.
Then the cloning using git# instead of username# worked perfectly. Again; still not sure why it won't work using my username and password (same as the one I use to login to the gitlab GUI), so if someone could shed some light on that, I'd be interested in it. But since it took my quite some time before I found this solution/work-around, thought I'd post it here. Perhaps better suited to serverfault actually, but since I suspect many people end up here as well, perhaps the admins can live with this post here :)
I have a trouble making git push work for me for Dokku instance on Azure. In particular, it was installed using this template. For installation I used the latest Dokku version (0.10.3) with Ubuntu 16.04.
The problem, I think, is that a special admin User is created from this template. So, I can ssh using its name and it works pretty well, but when I try to git push to remote (which is dokku#...) it prompts for a password. There is a similar question on StackOverflow, but I don't see any obvious solution to my problem
As I mentioned on the issue you filed in our issue tracker, you will still need to setup the ssh user via the web ui we start for your server. Once you set that up, you should be able to push code.
I used mac github client to push my codes to my github account. On my Ubuntu linux computer I wan't to connect to github using the terminal so that it will automatically sync will all my projects on github. How would I do it? All the online help I have bumped in to so far only show how to clone an exiting git repository not how to connect to my github account and sync it.
git, the revision control system, doesn't know anything about Github, a website that keeps track of and hosts your git repositories for you. The concept of a Github account is totally alien to git, so you'll never be able to, say, browse all of the projects you own on Github with a git command. git only works on the level of individual repositories.
Github also provides a graphical client that handles both the git level stuff and the Github level stuff -- it understands what a Github account is, and will log in for you and display all of the repos associated with the account. It's also a fully featured git client that does a lot of work on the level of individual repos for you. However, this graphical client is currently only available for Windows and OS X, and is not available for Linux.
My own workflow on Linux is to use the github.com website plus the command-line git tool. To bridge the gap between Github and git, you need to git clone individual repos. Aside from that, you can do Github administrative tasks on the website, and you can work with individual repos with git on the command line.
If you don't like this work flow, you need to look at graphical git clients for Linux. I'm not sure if any exist that will do both git-level stuff and also interface with Github specifically and understand the idea of a Github account.
You could also theoretically try to run the Windows client in wine on Linux, but I would not recommend this approach except as a last resort.
First I don't know a program that automatically sync all my github repositories.
First you have to install git (if it has not been done already) tutorial
Than you should generate a rsa:key to be able to 'push' your repositories to github.
You can generate a rsa_key by following this tutorial notes ssh-add id_rsa should be ssh-add id_rsa.pub ....also you can name id_rsa as anything you want: like bran_rsa_key
You should post or add your rsa_key to git hub at this address. If you go to that link you will see that you already have some key for your Mac but nothing for your Ubuntu.
After installation you could install ungit if you're not that familliar with git
The idea behind what I am wanting to do is to create a centralized server on a linux system. I understand how to set this up, and already have. Next I would like to set up git on a windows system, aka the client, which I understand is possible through msysgit, and gitextensions. The problem though is that I am wanting to integrate the windows client to be able to push and pull visual studio files but keep the repositories on the linux server. So in short my question is how to have a centralized server on linux for git, while the client on windows is able to push to this centralized server. Thanks in advance!
I solved my problem. What I wanted to do was to create a ssh connection between the server(linux) and the client (windows). I used tortoise git in this case with the git source control provider (visual studio integration). Just follow the steps within the link and anybody else who might have this problem will be set!
Links:
For tortoise setup: http://theswarmintelligence.blogspot.com/2009/11/windows-tortoisegit-client-for-linux.html
What's the catch here? This sounds like a completely standard use case. It's probably best to use SSH as a transport to push to the server. A couple of things to be aware of are:
You should create your centralized repository as a bare repository (i.e. one without a working tree)
If you have multiple users who will push to that repository, create a group for them on the Linux machine, and make sure that the permissions for the repository are appropriate, e.g.:
git init --bare --shared=group newrepository.git
chgrp -R developers newrepository.git
Or if you're going to have multiple repositories or need more sophisticated access control, you may want to look at using gitolite on the server.
On the client side, GitHub has a nice walkthrough for installing msysgit on Windows (and generating an SSH key) here:
http://help.github.com/win-set-up-git/
... and there are tutorials for gitextensions on its site.