Can't push over http
Created by: Snegovikufa
Gitlab push do not work when I use http url. Everything is OK, when I use ssh connection.
snegovik@SNEGOVIK-PC /d/Devel/test_gitlab (master)
$ cat .git/config
[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
symlinks = false
ignorecase = true
hideDotFiles = dotGitOnly
[remote "origin"]
url = http://192.168.1.11/snegovikufa/test_gitlab.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master
snegovik@SNEGOVIK-PC /d/Devel/test_gitlab (master)
$ git push origin master
Username for 'http://192.168.1.11': snegovikufa
Password for 'http://[email protected]':
Counting objects: 3, done.
Writing objects: 100% (3/3), 223 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
remote: GitLab: Failed to authorize your Git request: internal API unreachable
To http://192.168.1.11/snegovikufa/test_gitlab.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'http://192.168.1.11/snegovikufa/test_gitlab.git'
My GitLab version:
ii gitlab-ce 7.13.5-ce.0 amd64 GitLab Community Edition and GitLab CI (including NGINX, Postgres, Redis)
My gitlab.rb
## Url on which GitLab will be reachable.
## For more details on configuring external_url see:
## https://gitlab.com/gitlab-org/omnibus-gitlab/blob/629def0a7a26e7c2326566f0758d4a27857b52a3/README.md#configuring-the-external-url-for-gitlab
external_url 'http://192.168.1.11/'
## Note: configuration settings below are optional.
## Uncomment and change the value.
############################
# gitlab.yml configuration #
############################
# gitlab_rails['gitlab_ssh_host'] = 'ssh.host_example.com'
# gitlab_rails['time_zone'] = 'UTC'
gitlab_rails['gitlab_email_from'] = '[email protected]'
gitlab_rails['gitlab_default_projects_limit'] = 100
gitlab_rails['gitlab_default_can_create_group'] = true
gitlab_rails['gitlab_username_changing_enabled'] = true
# gitlab_rails['gitlab_default_theme'] = 2
gitlab_rails['gitlab_signup_enabled'] = false
gitlab_rails['gitlab_signin_enabled'] = true
# gitlab_rails['gitlab_restricted_visibility_levels'] = nil
gitlab_rails['gitlab_default_projects_features_issues'] = false
gitlab_rails['gitlab_default_projects_features_merge_requests'] = false
gitlab_rails['gitlab_default_projects_features_wiki'] = false
gitlab_rails['gitlab_default_projects_features_snippets'] = false
gitlab_rails['gitlab_default_projects_features_visibility_level'] = 'internal'
# gitlab_rails['gitlab_repository_downloads_path'] = 'tmp/repositories'
# gitlab_rails['issues_tracker_redmine'] = false
# gitlab_rails['issues_tracker_redmine_title'] = "Redmine"
# gitlab_rails['issues_tracker_redmine_project_url'] = "http://redmine.sample/projects/:issues_tracker_id"
# gitlab_rails['issues_tracker_redmine_issues_url'] = "http://redmine.sample/issues/:id"
# gitlab_rails['issues_tracker_redmine_new_issue_url'] = "http://redmine.sample/projects/:issues_tracker_id/issues/new"
# gitlab_rails['issues_tracker_jira'] = false
# gitlab_rails['issues_tracker_jira_title'] = "Atlassian Jira"
# gitlab_rails['issues_tracker_jira_project_url'] = "http://jira.sample/issues/?jql=project=:issues_tracker_id"
# gitlab_rails['issues_tracker_jira_issues_url'] = "http://jira.sample/browse/:id"
# gitlab_rails['issues_tracker_jira_new_issue_url'] = "http://jira.sample/secure/CreateIssue.jspa"
gitlab_rails['gravatar_enabled'] = false
# gitlab_rails['gravatar_plain_url'] = 'http://www.gravatar.com/avatar/%{hash}?s=%{size}&d=identicon'
# gitlab_rails['gravatar_ssl_url'] = 'https://secure.gravatar.com/avatar/%{hash}?s=%{size}&d=identicon'
# gitlab_rails['webhook_timeout'] = 10
Generated /opt/gitlab/embedded/service/gitlab-rails/config/gitlab.yml
# This file is managed by gitlab-ctl. Manual changes will be
# erased! To change the contents below, edit /etc/gitlab/gitlab.rb
# and run `sudo gitlab-ctl reconfigure`.
production: &base
#
#1. GitLab app settings
# ==========================
## GitLab settings
gitlab:
## Web server settings (note: host is the FQDN, do not include http://)
host: 192.168.1.11
port: 80
https: false
# Uncommment this line below if your ssh host is different from HTTP/HTTPS one
# (you'd obviously need to replace ssh.host_example.com with your own host).
# Otherwise, ssh host will be set to the `host:` value above
ssh_host:
# WARNING: See config/application.rb under "Relative url support" for the list of
# other files that need to be changed for relative url support
# relative_url_root: /gitlab
# Uncomment and customize if you can't use the default user to run GitLab (default: 'git')
user: git
## Date & Time settings
time_zone:
Generated /opt/gitlab/embedded/service/gitlab-shell/config.yml. I think that error in gitlab_url: "http://127.0.0.1:8080"
# This file is managed by gitlab-ctl. Manual changes will be
# erased! To change the contents below, edit /etc/gitlab/gitlab.rb
# and run `sudo gitlab-ctl reconfigure`.
# GitLab user. git by default
user: git
# Url to gitlab instance. Used for api calls. Should end with a slash.
gitlab_url: "http://127.0.0.1:8080"
http_settings:
# user: someone
# password: somepass
# ca_file: /etc/ssl/cert.pem
# ca_path: /etc/pki/tls/certs
# self_signed_cert: false
# Repositories path
# Give the canonicalized absolute pathname,
# REPOS_PATH MUST NOT CONTAIN ANY SYMLINK!!!
# Check twice that none of the components is a symlink, including "/home".
repos_path: "/var/opt/gitlab/git-data/repositories"
# File used as authorized_keys for gitlab user
auth_file: "/var/opt/gitlab/.ssh/authorized_keys"
# Redis settings used for pushing commit notices to gitlab
redis:
bin: /opt/gitlab/embedded/bin/redis-cli
host: 127.0.0.1
port:
socket: /var/opt/gitlab/redis/redis.socket
database:
namespace: resque:gitlab
# Log file.
# Default is gitlab-shell.log in the root directory.
log_file: "/var/log/gitlab/gitlab-shell/gitlab-shell.log"
Found warning in gitlab-shell.log:
snegovik@mit-toshiba:~$ sudo cat /var/log/gitlab/gitlab-shell/gitlab-shell.log | grep W
W, [2015-08-24T10:29:02.255332 #17160] WARN -- : Failed to connect to internal API <POST http://127.0.0.1:8080/api/v3/internal/allowed>: #<Net::ReadTimeout: Net::ReadTimeout>