将项目推送到github时系统询问密码 [英] System ask password when push project to github
问题描述
我在Centos 6x
上设置了gitlab. Webserver : nginx
.
I setup gitlab on Centos 6x
. Webserver : nginx
.
我按照链接安装了gitlab.
而且我有一个问题:当我将客户端上的项目推送到gitlab@mydomain.com
时,系统询问密码:
I installed my gitlab follow link .
And i have a problem : when i push my project on client to gitlab@mydomain.com
, system ask password :
git push -u origin master
git@gitlab.mydomain.com's password:
然后我在客户端上显示我的项目的配置文件:
Then i show config file of my project on client :
cat ../.git/config
cat ../.git/config
[核心]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[分支主"]
[远程来源"]
url = git@gitlab.mydomain.com:myusename/myproject.git
fetch = +refs/heads/*:refs/remotes/origin/*
当我检查时,系统显示日志:
System showed log When i check :
捆绑执行耙gitlab:check RAILS_ENV = production
bundle exec rake gitlab:check RAILS_ENV=production
/usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:216:警告:不安全的世界可写目录/usr/bin在PATH模式下040777
/usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:216: warning: Insecure world writable dir /usr/bin in PATH, mode 040777
/usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:216:警告:不安全的世界可写目录/usr/bin在PATH模式下040777
/usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/runtime.rb:216: warning: Insecure world writable dir /usr/bin in PATH, mode 040777
检查环境...
..
..
我要关闭密码要求.
有些人帮助我,非常感谢.
Some body help me , thanks a lot .
推荐答案
我假设您已经检查过公用密钥有效,并且已将其安装在客户端和服务器/gitlab上,并且ssh正在为该计算机上的另一个用户使用公用密钥.
I assume you have checked you public keys are valid and installed on client and server/gitlab and that ssh is working with public keys for another user on that machine.
您是否已检查git用户〜/.ssh目录(应为700)和〜/.ssh/authorized_keys(600)上的文件权限.
Have you checked file permissions on the git users ~/.ssh directory (should be 700) and ~/.ssh/authorised_keys (600).
还启用了selinux吗?您可能对安全上下文有疑问-请参见 https://serverfault.com/a/564824/204206
Also is selinux enabled? You may have an issue with security contexts - see https://serverfault.com/a/564824/204206
这篇关于将项目推送到github时系统询问密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!