Dot / period in local branch name disallows push to remote

Summary

Dot / period in local branch name disallows push to remote.

Steps to reproduce

  1. Create branch name with legally placed period / dot (U+002E) in the name. Example "version3.2.4" See man git-check-ref-format for full branch name rules.
  2. Make sure branch does not already exist in remote GitLab repos. This way, no one can mark it as "protected".
  3. Make sure the GitLab account which matches up with the SSH public key you are using has permission to the remote GitLab repos.
  4. Push the remote branch to GitLab via SSH.
  5. Problem happens.

Example Project

None needed. See console output below.

What is the current bug behavior?

Git says "batch response: http: Access forbidden. Check your access level."

What is the expected correct behavior?

Successful git push output.

Relevant logs and/or screenshots

Output was doctored to remove company name and expand oh-my-zsh aliases.

18-08-17T14:32 ~/Code/Messaging
‹version3.2.4› 🐵  git push --set-upstream bhgitlab version3.2.4
Git LFS: (0 of 63 files) 0 B / 112.85 MB
batch response: http: Access forbidden. Check your access level.
Docs: https://blueharvest.org/help
error: failed to push some refs to 'git@blueharvest.org:blueharvest-app/iOS/Messaging.git'
18-08-17T14:32 ~/Code/Messaging
‹version3.2.4› 🐵  git branch -m version3.2.4 version324
18-08-17T15:37 ~/Code/Messaging
‹version324› 🐵  git push --set-upstream bhgitlab version324
Git LFS: (63 of 63 files) 112.85 MB / 112.85 MB
Counting objects: 103, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (103/103), done.
Writing objects: 100% (103/103), 13.43 KiB | 1.49 MiB/s, done.
Total 103 (delta 15), reused 0 (delta 0)
remote: Resolving deltas: 100% (15/15), completed with 12 local objects.
remote: 
remote: To create a merge request for version324, visit:
remote:   https://blueharvest.org/blueharvest-app/iOS/Messaging/merge_requests/new?merge_request%5Bsource_branch%5D=version324
remote: 
To blueharvest.org:blueharvest-app/iOS/Messaging.git
 * [new branch]      version324 -> version324
Branch 'version324' set up to track remote branch 'version324' from 'bhgitlab'.

Output of checks

(If you are reporting a bug on GitLab.com, write: This bug happens on GitLab.com)

Results of GitLab environment info

Expand for output related to GitLab environment info

(For installations with omnibus-gitlab package run and paste the output of: sudo gitlab-rake gitlab:env:info)

(For installations from source run and paste the output of: sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production)

Results of GitLab application Check

Expand for output related to the GitLab application check

(For installations with omnibus-gitlab package run and paste the output of: sudo gitlab-rake gitlab:check SANITIZE=true)

(For installations from source run and paste the output of: sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true)

(we will only investigate if the tests are passing)

Possible fixes

(If you can, link to the line of code that might be responsible for the problem)

Edited Jun 24, 2025 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading