相关疑难解决方法(0)

无法使用http/https将Git推送到远程存储库

我在服务器上由apache提供服务的目录中有一个Git存储库.我已经配置了WebDAV,它似乎正在运行.Litmus返回100%的成功.

我可以从远程主机克隆我的存储库,但在尝试推送http或https时,我收到以下错误:

错误:无法访问网址 https://git.example.com/repo/,返回代码22致命:git-http-push failed

任何的想法?

git https push http

21
推荐指数
2
解决办法
6万
查看次数

GIT-HTTP的后端

我尝试使用git-http-backend设置一个git服务器,一切都按照我的要求运行,但有一点小事.

配置

<VirtualHost *:80>
ServerName git.server.com
SetEnv GIT_PROJECT_ROOT /srv/git
SetEnv GIT_HTTP_EXPORT_ALL
SetEnv REMOTE_USER=$REDIRECT_REMOTE_USER
ScriptAlias /git /usr/lib/git-core/git-http-backend/

<Directory "/usr/lib/git-core*">
   Options ExecCGI Indexes
   Order allow,deny
   Allow from all
</Directory>

<LocationMatch "^/git/repos/git-receive-pack$">
  AuthType Digest
  AuthName "Git Repositories"
  AuthUserFile /srv/git/.git-auth-file
  AuthGroupFile /srv/git/.git-group-file
  Require valid-user
</LocationMatch>
</VirtualHost>
Run Code Online (Sandbox Code Playgroud)

这允许每个人阅读repos但只有有效的用户才能阅读.让我烦恼的是网址是http://git.server.com/git/repos.我想摆脱URL 中的git,如http://git.server.com/repos.当我将配置更改为

<VirtualHost *:80>
ServerName git.server.com
SetEnv GIT_PROJECT_ROOT /srv/git
SetEnv GIT_HTTP_EXPORT_ALL
SetEnv REMOTE_USER=$REDIRECT_REMOTE_USER
ScriptAlias / /usr/lib/git-core/git-http-backend/

<Directory "/usr/lib/git-core*">
   Options ExecCGI Indexes
   Order allow,deny
   Allow from all
</Directory>

<LocationMatch "^/repos/git-receive-pack$">
  AuthType Digest
  AuthName …
Run Code Online (Sandbox Code Playgroud)

apache git git-http-backend

15
推荐指数
2
解决办法
2万
查看次数

gitlab: git-http-push 失败,返回码 22

首先我的 gitlab 连接被错误 500 和 502 中断。服务器有一段时间无人看管。所以我决定重新安装:

#gitlab-ctl cleanse
#apt-get purge gitlab-ce
Run Code Online (Sandbox Code Playgroud)

安装:https : //about.gitlab.com/downloads/#ubuntu1404

在可以访问 gitlab 之后,我可以创建一个项目并克隆它。
在我尝试将新文件推送到我的存储库并收到以下消息后:

git add .
git commit -m "inital"
git push  --set-upstream origin master

error: Cannot access URL http://<username>@gitlab.domain.de:<port>/group/project.git/, return code 22
fatal: git-http-push failed
error: failed to push some refs to 'http://<username>@gitlab.domain.de:<port>/group/project.git/'
Run Code Online (Sandbox Code Playgroud)

gitlab-check 提供以下信息:#gitlab-rake gitlab:check

除了紫罗兰色之外,一切都是绿色的:

Uploads directory setup correctly? ... skipped (no tmp uploads folder yet)
Init script exists? ... skipped (omnibus-gitlab has no init script)
Init script up-to-date? ... …
Run Code Online (Sandbox Code Playgroud)

gitlab

7
推荐指数
0
解决办法
2028
查看次数

标签 统计

git ×2

apache ×1

git-http-backend ×1

gitlab ×1

http ×1

https ×1

push ×1