本文介绍了如何设置git的服务器,不使用SSH身份验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

前段时间我偶然发现了如何通过Web服务器设置git的认证在某种程度上解释。这样,就需要在客户端没有SSH密钥交换。

可耻的是我,我既没有书签其链接也能记住的技术。

Some time ago I stumbled upon an explanation on how to set up git authentication via the web server somehow. That way no ssh key swapping would be needed on client side.
Shame on me, I did neither bookmark its link nor can remember the technique.

我只是错过抛出一个用户名:密码组合给予一次性一些库的访问。当原型一些VM设置这是最后一次,我觉得这方面的需要,快照并不是一个理想的解决方案。

I just miss throwing out a username:password combo to give access to some throwaway repositories. When prototyping some VM setups it was the last time I felt this need, snapshots were not an ideal solution.

是否可以使用git只是基于密码的授权?

另外,我听到的示例用例将是大学,这种做法是少的方式组织的开销设立新的占30人每学期。
想象一下,从一堆有麻烦的人收集SSH密钥刚刚的生成自己的密钥对的,甚至没有说话的人的知识缺乏一个什么样的VCS甚至是或者它是干什么用的。

Another example use case I heard of would be in university, where this approach is way less organisational overhead to set up new accounts for 30 people every semester.Imagine collecting ssh keys from a bunch of people that have trouble to just generate an own key pair, not even speaking of the people's lack of knowledge what a VCS even is or what it is used for.

当然,这个解决方案是只使用SVN版本控制。
但它是neccessary把SVN使用的时候可以有混帐?

Of course, a solution to this would be to just use SVN for version control.But is it neccessary to put SVN to use when you can have git?

要prevent误解,我有自己的服务器上运行一个工作gitolite设置和我使用SSH密钥完全正常的客户端和服务器明智的。

To prevent misunderstandings, I have my own server running a working gitolite setup and am perfectly fine with using ssh keys client- and server-wise.

推荐答案

您可以使用gitolite与能够提供认证(所以排除了它没有认证Git协议)的任何服务。

You can use gitolite with any service able to provide an authentication (so rules out the git protocol which has no authentication).

HTTPS配置会调用gitolite与Apache服务器将分给gitolite脚本的ID。

My https configuration will call gitolite with the id that the apache server will give to the gitolite script.

ScriptAlias /hgit/ @H@/sbin/gitolite-shell/
SetEnv GIT_HTTP_BACKEND "@H@/usr/local/apps/git/libexec/git-core/git-http-backend"
<Location /hgit>
   ...
</Location>

这篇关于如何设置git的服务器,不使用SSH身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-13 13:47
查看更多