Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G gitlabhq1
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gpt
  • large_projects
  • gitlabhq1
  • Issues
  • #2165

Closed
Open
Created Dec 04, 2012 by Administrator@rootOwner

HTTP commit changes owner of the committed branch from git to gitlab

Created by: elvanja

I have mixed SSH/HTTP access enabled for our Gitlab instance. It seems that HTTP commit changes owner of the git branch, which breaks SSH access to the repository / that branch.

How to reproduce:

  • status for a project that was created and pushed to with SSH
$ dir -alh heads/master

returns:

-rw-rw---- 1 git git 41 Dec  3 14:10 heads/master

(execute this in the project repository on Gitlab instance)

  • after HTTP commit we get:
-rw-rw---- 1 gitlab gitlab 41 Dec  3 14:13 heads/master

HTTP access will continue to work normally, but SSH fetch/pull will result in:

$ git fetch origin master
fatal: Couldn't find remote ref master
fatal: The remote end hung up unexpectedly

or

$ git fetch
Your configuration specifies to merge with the ref 'master'
from the remote, but no such ref was fetched.

Gitlab runs as gitlab user, so I suppose this has something to do with it. A dirty workaround is to change back ownership of repositories to git within a cron job. Is there a better way to fix this?

I am using latest stable release 3.1.0, and latest gitolite 3.x gitlab fork.

Assignee
Assign to
Time tracking