Menu
  • HOME
  • TAGS

Gitlab redirecting loop

Tag: gitlab,gitlab-7

yesterday I installed gitlab on a vm of mine and configured everything to work with it.

Gitlab listens on port 8081 of my domain (e.g. domain:8081).

I have an apache instance which listens to port 80 and 443, so I did a forward there (e.g. domain/git).

Everything worked fine (except the css theme of domain/git, but thats no problem), but then I changed the root url (I think, I don't know how this settings is called) in the admin section directly in gitlab to http://domain/git to let gitlab show me directly this url if I want to copy a URL to clone.

Now I can't access my gitlab instance, because I do have an redirection loop.

I also can't find where the setting was done by gitlab itself, I guess it's stored in the database and not any file.

Can someone help me figure out how to change this particular configuration back to default?

Thanks in advance!

Best How To :

You likely changed the 'homepage url' used for redirecting logged out users. Instead of hitting the domain mainpage, hit /users/sign_in and you should be able to sign back in as your admin user. Go to the admin section, and clear out the setting.

You instead need to go into your config/gitlab.yml (source install) or /etc/gitlab/gitlab.rb (package install) and set the external_url to be the address you wanted.

Then restart/reconfigure the app to have it used in the git clone instructions.

gitlab api get group list only 20 groups not all

curl,gitlab

20 is the default number of results returned by GitLab API You could pass the per_page=80 parameter, to get your 80 expected groups....

git - create a new branch from local copy and then merge it with existing branch

git,version-control,merge,gitlab,pull

Assuming you mean that you made a local copy of the root folder and worked on it (without the .git directory), simply go back to the original directory and make sure you are up to date with git pull. Then, take your local copy and copy it over the original...

Git can't connect to Gitlab, SSH verification error

git,ssh,gitlab,ssh-keys

That is because you are using an https url. Https means the public and private ssh keys stored in %HOME%.ssh are not used. At all. Try switching to an ssh url: git remote set-url origin (user)@(ip address):(group)/(project).git With a standard GitLab installation (user) should be git. You can check first...

How to set up two SSH keys for two GitLab accounts and push/pull by using TortoiseGit?

git,ssh,key,gitlab,tortoisegit

Simply declare each private ssh keys in a %HOME%/.ssh/config file: Host gitlabuser1 User git Hostname {hostname} PreferredAuthentications publickey IdentityFile C:/Users/{username}/.ssh/id_rsa1 Host gitlabuser2 User git Hostname {hostname} PreferredAuthentications publickey IdentityFile C:/Users/{username}/.ssh/id_rsa2 That supposes your set of ssh keys are: %HOME%/.ssh/id_rsa1 ; %HOME%/.ssh/id_rsa1.pub %HOME%/.ssh/id_rsa2 ; %HOME%/.ssh/id_rsa2.pub You can then use the urls...

gitlab: Windows: How to use chmod and fix “Get Permission denied (publickey). fatal: Could not read from remote repository”

git,bash,gitlab,git-bash

Am I on the right track here, is it the permissions of the folder/files that are the problem Not really: "permission denied" is sent back by the GitLab server, as it doesn't recognize your ssh public key. Firstly, as mentioned in GitLab ssh keys doc page: Copy-paste the key...

SSH Config are ignored by git client

git,ssh,gitlab

The Host entry is a pattern that is matched to what host you request when looking for keys. Then, HostName is what host is actually logged into, and defaults to the value for Host. So, you could say: Host gitlab.host1.com User user1 IdentityFile ~/.ssh/id_rsa_1 You could also specify gitlab.host1.com-user1 as...

Unable to install the latest version of Gitlab (7.10.4)

git,bash,curl,gitlab

You use apt-get which does not look for your curl downloaded package. Find the right locatio of teh file, add it to the apt-get database and then execute: apt-get update apt-get upgrade apt-get install gitlab-ce More information and detailed steps can be found here...

How to use gitlab for web development?

git,gitlab

Introducing a Vcs will slow you down at first but it will be very helpful in managing your project. If I got you right, so far you have been developing directly on the production server accessing the code through FTP, this is fast of course but also very much...

Files deleted with git filter-branch reappear after push and pull back

git,gitlab,git-filter-branch

I merged the other branch into master and redid it. Works now. Can't tell whether it was an error on my part, or two branches have something to do with it.

Correct git operation to merge portion of a branch

git,merge,gitlab

I think you just want to merge G into D: git checkout D git merge G Afterwards your history will look like this: master A---B---C---D---M <-- HEAD \ / f1 E---F---G---H I'd advise against rebasing E-G on top of D, as it will be much harder later to merge H...

Gitlab LDAP (Active Directory) Authentication without Server Side Access

ruby-on-rails,active-directory,ldap,gitlab

For Active Directory, the uid should be: uid: 'sAMAccountName' Gitlab should connect using the user specified in the bind_dn, with the given password. ...

How to store releases/binaries in GitLab?

git,jenkins,gitlab,nexus

This is in progress, and suggested in suggestions 4156755: We’re accepting merge requests for the minimal proposal by Ciro: For each repository tag under https://github.com/cirosantilli/test/releases/tag/3.0, allow to upload and download a list of files. The upload and download can be done directly from the tag list view. If a tag...

Git problems, 'git not installed'

ruby-on-rails,git,github,bundle,gitlab

Check if Git is installed in a folder with spaces or special character. Try and unzip a recent Git (like PortableGit-2.3.7.1-dev-preview-64-bit.7z.exe) under C:\Git, and add that to your PATH: set PATH=C:\Git\cmd;%PATH% bundle install The PATH issue was mentioned before in issue 5027 and in "Can't run bundle update on Windows"....

Git looking for my SSH key in the wrong location

git,ssh,gitlab,ssh-keys

GitLab itself isn't looking for your ssh keys: as a client, you are using ssh to contact GitLab, which means only openssh is looking for those keys. It (openssh) will find them in: %HOME%\.ssh (so check what the environment variable HOME is set to) %HOME%\.ssh\config (where an IdentifiyFile directive can...

How to push an Android Studio Project to a remote GitLab Repository

java,git,android-studio,gitlab

https://[serverip]:[gitlabport] isn't enough as a remote url: you are missing the name of a repo. This would be better: git remote set-url origin https://[serverip]:[gitlabport]/<reponame> <reponame> should be the name of an empty repo declared through the GitLab web interface. So it isn't an issue of protocol (https vs. ssh: https...

I can push but not pull git

git,gitlab

Ok so it appears. Git init generated a FETCH_HEAD file that belonged to root. The rest of .git/ was my users. I had to change the ownership of the file to my user an then the problem resolved. Why it was not simply refusing me permission to access the file...

Am I allowed to use GitLab Community Edition for commercial projects? [on hold]

git,open-source,licensing,gitlab

Yup, it is under the MIT license. There is nothing preventing you from using it for commercial projects. The other editions simply add more features and support.

Git Clone Fails with sslRead() error on OS X Yosemite

git,curl,openssl,osx-yosemite,gitlab

Javabrett's link got me to the answer, it revolves around Yosemite using an incorrect SSL dependency, which Git ends up using. Installing Git via homebrew with these flags works: brew install git --with-brewed-curl --with-brewed-openssl ...

GitLab for CentOS i386

gitlab,rpm,centos6,i386

Support team has provided the instructions for building gitlab for CentOS from sources

Capistrano and Corkscrew PATH error

ruby-on-rails,git,ssh,capistrano,gitlab

The problem seems to be that ssh can't find the corkscrew executable. I double-checked my local ~/.ssh/config file, and I use the full path to the corkscrew executable in there: Host * ProxyCommand /usr/local/bin/corkscrew <server> 8088 %h %p ~/.ssh/proxyauth (Since I'm on OS X and have installed corkscrew through Homebrew,...

Why can't the container display the content of mounting directory of host?

linux,docker,gitlab

You are not mapping any host directories to container besides /backup. --volume /var/opt/gitlab creates new volume, if you want to map directory, use --volume /var/opt/gitlab:/var/opt/gitlab syntax - https://docs.docker.com/reference/run/#volume-shared-filesystems

How can I clone a private Gitlab repo?

git,github,gitlab

you have your ssh clone statement wrong git clone username [email protected]:root/test.git, that statement would try to clone a repository named username into the location relative to your current path [email protected]:root/test.git You want to leave out username: git clone [email protected]:root/test.git ...

GitLab import 6.8.1 into 7.10.4

migration,gitlab,user-accounts

FYI You haven't specified whether the old or new server is running a source installation or omnibus, or whether you're running a MySQL or Postgres database. Instructions differ depending on these factors, so please clarify and I will update my answer. The first thing is that you will need your...

Gitlab / Redmine automatic close issue with commit

redmine,gitlab

You can use Redmine as an issue tracker with setting the redmine service in Gitlab (In your project -> Services -> Redmine -> fill the URLs, and set active). If this works, when you press "new issue" button in Gitlab, you are redirected to Redmine new issue page. In Gitlab...

How do you process a Gitlab merge request?

git,merge,workflow,gitlab

If the person testing the merge locally uses the --no-ff flag when merging git merge --no-ff branchname Then if they test and like the result, they can push to the target, and GitLab will know to go and close the merge request....

Gitlab: Can I create a Branch visible to only certain developers?

permissions,authorization,branch,gitlab

No, it is not possible to have a read protection to certain git branches. That would also defeat how git works. What you could do is forking a repository, creating a branch here and only grant restricted permission to the entire repository. Later it would always be possible to merge...

How to configure gitlab to use existing postgres server

postgresql,nginx,gitlab,centos7

According to this doc, put this in /etc/gitlab/gitlab.rb : # Disable the built-in Postgres postgresql['enable'] = false # Fill in the values for database.yml gitlab_rails['db_adapter'] = 'postgresql' gitlab_rails['db_encoding'] = 'utf8' gitlab_rails['db_host'] = '127.0.0.1' gitlab_rails['db_port'] = '3306' gitlab_rails['db_username'] = 'foo' gitlab_rails['db_password'] = 'bar' And run this command to apply this values...

GitLab shows deleted branches

git,git-branch,gitlab

$ git remote add gitlab <url> $ git push gitlab --delete <branchname> ...

git diff not working on a bare repo, post-receive hook

git,gitlab,githooks,git-post-receive

I believe the command you are looking for is git diff --name-only HEAD^ HEAD. This will compare the "current" commit with the commit before it.

Always gitlab 502 error on RaspberryPi

ruby,git,gitlab

Finally I have it. This post was very helpful. Thanks for help! ... :/

how to clone a GitLab repo

git,gitlab,git-clone

GitLab repos have 3 settings - pertaining to the users eligible to clone them - private, internal and public. Adding the deploy user from your Capfile (or which ever way you need access to the repo) and then logging in as that user and adding its public SSH key will...

gitlab backup restore aborting with error “relation not found”

gitlab

The Answer is quite obvious after some time. I just tried to restore a MySQL-Backup into a PostgreSQL database, wich is no good idea. Translating MySQL- into PostgreSQL-Style SQL should do the trick.

GitLab: Deploy keys are not allowed to push

git,gitlab

Just make sure the host matches what you expect, and that the key fingerprint is what you expect (the key fingerprint should be posted in GitLab's docs), and continue by typing yes and press ENTER You're seeing this because you've never connected to that host before....

How do I remove Tag in GitLab repository

git,tags,gitlab

Obviously you don't have the permission of deleting tags in remote GitLab repo. Either ask for the owner of the repo to grant you the permission of master or let him help you to delete the tag would help....

Custom post-receive hook with gitlab

git,gitlab,webhooks

on the file so it is owned by the 'git' user. I have no git user on the webserver... all other git related files are owned by my user or root. That is because oyur webserver is a client of the GitLab server. The documentation you reference is for...

Why is there no logs using “docker run image command” to start container?

git,docker,gitlab

That would be because the /bin/true CMD (from docker run genezys/gitlab:7.5.2 /bin/true) overwrites the original CMD defined in the Dockerfile: # Default is to run runit & reconfigure CMD ["/usr/local/bin/gitlab.sh"] Since GitLab is never run (with /bin/true), it never outputs any log. The docker run has a COMMAND parameter: docker...

Git pull and push works in Windows but not in VM

git,ssh,virtual-machine,gitlab,ssh-keys

First, don't copy your windows keys in your Ubuntu ~/.ssh. The private key is called private for a reason ;) Second, do check the permission of your new id_rsa and id_rsa.pub files that you need to generate in your new client environment (the Ubuntu one). A ls -alrt ~/.ssh will...

LF will be replaced by CRLF in git -the file will have its original line endings

git,gitlab

This usually happens when you are on Windows and either core.autocrlf is set to true, or the .gitattributes contains directives to perform line ending normalizations. The way line ending normalization works (on a Windows machine) is that when you commit a file, git replaces every CRLF with a LF, and...

Gitlab (rails) “raw” file mime type for .svg files is 'text/plain'. Can it be configured to output as 'image/svg+xml'?

ruby-on-rails,gitlab

Found it. seems the content type is set in ruby code in the raw_controller.rb file. so i edit /opt/gitlab/embedded/service/gitlab-rails/app/controllers/projects/raw_controller.rb change this: def get_blob_type if @blob.text? 'text/plain; charset=utf-8' else 'application/octet-stream' end end to something like this: def get_blob_type extn = File.extname(@blob.name).downcase if @blob.text? if extn == ".svg" 'image/svg+xml' else 'text/plain; charset=utf-8'...

gitlab behind https terminating reverse proxy and oauth

github,oauth,https,reverse-proxy,gitlab

After some playing around I found out that setting the following in the nginx config solves the issue: proxy_set_header X-Forwarded-Proto https; Since I always want to access my gitlab instance via https, this works well for me and seems to also make oauth possible now. Sorry, I should've played around...

Security in Gitlab. With gitolite?

git,security,debian,gitlab

First, GitLab has replaced Gitolite with GitLab shell long ago: https://github.com/gitlabhq/gitlab-shell , I don't think it is compatible with gitolite anymore. Next, why do you need to play with GitLab shell to hide code from emploees? Why not just: put the code on a safe server which employees cannot access...

Can you create a project on GitLab using ssh?

ssh,gitlab

If you'd like to create a project on a Gitlab server for automation purposes, I would recommend using their REST API which allows you to perform various actions on the Gitlab platform. Among them, it is possible to create a project owned by the authenticated user, or to create a...

restore gitlab backup repository bundle file with all branches

git,gitlab,git-bundle

If the bundle was create with all branches, you should be able to see all the branches after a git clone --mirror: git clone --mirror /path/to/your/bundle yourRepo.git Note the .git since the --mirror would create a bare repo....

Fully qualified domain name for gitlab

nginx,gitlab

You "only" need to write the no-ip.com hostname into your gitlab and nginx configuration (nginx doesn't care too much with the gitlab-ssl configuration but it's a good habit that is required in bigger setups). You do not need to write them to /etc/hosts and /etc/hostname. The main use for this...

Gitlab redirecting loop

gitlab,gitlab-7

You likely changed the 'homepage url' used for redirecting logged out users. Instead of hitting the domain mainpage, hit /users/sign_in and you should be able to sign back in as your admin user. Go to the admin section, and clear out the setting. You instead need to go into your...

Git/Gitlab Push RPC failed; result=22, HTTP code = 411

git,nginx,push,gitlab

So the problem was caused by the "nativ" Nginx version of Debian 7. In there Repo's it has version 1.2.1 and in this Version it doesn't support chunked files. Updating Nginx over DotDep to version 1.6 solved the Problem.

From development to deployment with Git

git,laravel,github,gitlab

The best approach i think (and this is what we are following on a large project we are working) is to setup a separate git project on a separate environment (let's say "Test" or "Stage" environment) from which you are going to clone the git project hosted on gitlab. After...

Installing GitLab CI Runner on Raspberry Pi 2 (Raspbian)

ruby,gitlab,raspberry-pi2

Managed to install an unofficial runner. Guide here: https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/blob/master/docs/install/linux-manually.md...

Create external link in GitLab Flavored Markdown

gitlab

The file:// protocol is not included in the sanitation filter whitelist referenced by gitlab in the documentation. You could manually edit embedded/service/gitlab-rails/lib/gitlab/markdown.rb in your gitlab installation, add the protocol to the whitelist yourself and restart gitlab after that to apply the changes (just insert the line with the leading +):...