unable to create project from the command line in version 12.9.3 . it worked in version 12.8.5
Summary
We are unable to create projects from the command line, we need to run the same push command twice to have the correct output.
Steps to reproduce
in linux
533 cd newp
534 git init
535 git checkout -b master
536 touch 1
537 git add .
539 git commit -a -m "new repo "
541 git push --set-upstream git@gitlabinstance:lramirez/newp.git master --follow-tags
remote:
remote: ========================================================================
remote:
remote: 500 Internal Server Error
remote:
remote: ========================================================================
remote:
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
(How one can reproduce the issue - this is very important)
Example Project
(If possible, please create an example project here on GitLab.com that exhibits the problematic behavior, and link to it here in the bug report)
It is important to mention that this issue is also present in gitlab.com
I tried the same command and failed
git push --set-upstream git@gitlab.com:lramirez_ib/$(git rev-parse --show-toplevel | xargs basename).git $(git rev-parse --abbrev-ref HEAD)
Warning: Permanently added the ECDSA host key for IP address '172.65.251.78' to the list of known hosts.
remote:
remote: ========================================================================
remote:
remote: 500 Internal Server Error
remote:
remote: ========================================================================
remote:
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
(If you are using an older version of GitLab, this will also determine whether the bug is fixed in a more recent version)
What is the current bug behavior?
The project is not created the first time, if the same push command is used, it works.
What is the expected correct behavior?
it should create a new project
Relevant logs and/or screenshots
{"time":"2020-04-16T19:59:19.689Z","severity":"INFO","duration":2359.59,"db":183.09,"view":2176.5,"status":500,"method":"POST","path":"/api/v4/internal/allowed","params":[{"key":"action","value":"git-receive-pack"},{"key":"project","value":"lramirez/wika2.git"},{"key":"changes","value":"_any"},{"key":"protocol","value":"ssh"},{"key":"key_id","value":"1487"},{"key":"check_ip","value":"10.16.82.5"}],"host":"127.0.0.1","remote_ip":"127.0.0.1","ua":"Go-http-client/1.1","route":"/api/:version/internal/allowed","exception.class":"NoMethodError","exception.message":"undefined method `id' for nil:NilClass","exception.backtrace":["lib/gitlab/gl_repository/repo_type.rb:32:in `identifier_for_container'","lib/api/helpers/internal_helpers.rb:95:in `gl_repository'","lib/api/internal/base.rb:69:in `check_allowed'","lib/api/internal/base.rb:117:in `block (2 levels) in <class:Base>'"],"gitaly_calls":10,"gitaly_duration":0,"correlation_id":"4a53ed37-2ba0-4174-81b6-b3c7cc9c9e79"}
(Paste any relevant logs - please use code blocks (```) to format console output, logs, and code as it's tough to read otherwise.)
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`) gitlab-ee 12.9.3 gitlab-ce 12.9.3 gitlab.com it worke din gitlab-ee 12.8.5 (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)