我想问一下是否可以禁用全局 2FA 策略(每个人都需要在访问 gitlab 之前激活 2FA),但我无法在 Web 界面上禁用它,因为我无法激活它,它每次都会给我PIN code invalid
。我尝试同步服务器日期和我的 Google Authenticator 应用程序,但仍然收到错误。我使用 Omnibus 安装了 GitLab。我找到了以下命令,但它只禁用所有用户的 2FA。
gitlab-rake gitlab:two_factor:disable_for_all_users
目前没有启用 2FA 的用户。
我有 gitlab 服务器的完全访问权限。
以下是我从我的网络界面获得的信息:
我无法以管理员用户身份在设置中导航
命令:
sudo gitlab-rake gitlab:env:info
输出:
System information
System: CentOS 7.6.1810
Current User: git
Using RVM: no
Ruby Version: 2.5.3p105
Gem Version: 2.7.6
Bundler Version:1.17.3
Rake Version: 12.3.2
Redis Version: 3.2.12
Git Version: 2.18.1
Sidekiq Version:5.2.5
Go Version: unknown
GitLab information
Version: 11.10.4
Revision: 62c464651d2
Directory: /opt/gitlab/embedded/service/gitlab-rails
DB Adapter: PostgreSQL
DB Version: 9.6.11
URL: https://privateurl
HTTP Clone URL: https://privateurl/some-group/some-project.git
SSH Clone URL: git@privateurl:some-group/some-project.git
Using LDAP: no
Using Omniauth: yes
Omniauth Providers:
GitLab Shell
Version: 9.0.0
Repository storage paths:
- default: /var/opt/gitlab/git-data/repositories
GitLab Shell path: /opt/gitlab/embedded/service/gitlab-shell
Git: /opt/gitlab/embedded/bin/git
命令:
sudo gitlab-rake gitlab:check SANITIZE=true
输出:
Checking GitLab subtasks ...
Checking GitLab Shell ...
GitLab Shell: ... GitLab Shell version >= 9.0.0 ? ... OK (9.0.0)
Running /opt/gitlab/embedded/service/gitlab-shell/bin/check
Check GitLab API access: OK
Redis available via internal API: OK
Access to /var/opt/gitlab/.ssh/authorized_keys: OK
gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Gitaly ...
Gitaly: ... default ... OK
Checking Gitaly ... Finished
Checking Sidekiq ...
Sidekiq: ... Running? ... yes
Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Checking Incoming Email ...
Incoming Email: ... Reply by email is disabled in config/gitlab.yml
Checking Incoming Email ... Finished
Checking LDAP ...
LDAP: ... LDAP is disabled in config/gitlab.yml
Checking LDAP ... Finished
Checking GitLab App ...
Git configured correctly? ... yes
Database config exists? ... yes
All migrations up? ... yes
Database contains orphaned GroupMembers? ... no
GitLab config exists? ... yes
GitLab config up to date? ... yes
Log directory writable? ... yes
Tmp directory writable? ... yes
Uploads directory exists? ... yes
Uploads directory has correct permissions? ... yes
Uploads directory tmp has correct permissions? ... yes
Init script exists? ... skipped (omnibus-gitlab has no init script)
Init script up-to-date? ... skipped (omnibus-gitlab has no init script)
Projects have namespace: ...
2/3 ... yes
2/4 ... yes
2/6 ... yes
3/7 ... yes
3/10 ... yes
2/11 ... yes
3/12 ... yes
3/13 ... yes
3/19 ... yes
3/20 ... yes
3/21 ... yes
2/22 ... yes
2/23 ... yes
2/24 ... yes
2/26 ... yes
2/27 ... yes
2/28 ... yes
2/29 ... yes
2/30 ... yes
2/31 ... yes
2/32 ... yes
2/33 ... yes
2/34 ... yes
2/38 ... yes
2/40 ... yes
2/41 ... yes
2/43 ... yes
2/45 ... yes
7/47 ... yes
7/48 ... yes
7/49 ... yes
3/50 ... yes
7/51 ... yes
7/53 ... yes
7/55 ... yes
7/56 ... yes
7/57 ... yes
7/58 ... yes
7/59 ... yes
7/60 ... yes
7/61 ... yes
7/62 ... yes
7/63 ... yes
7/64 ... yes
7/65 ... yes
7/66 ... yes
3/67 ... yes
7/68 ... yes
7/70 ... yes
7/71 ... yes
3/73 ... yes
7/74 ... yes
8/78 ... yes
8/80 ... yes
8/81 ... yes
8/82 ... yes
8/83 ... yes
8/84 ... yes
7/86 ... yes
7/87 ... yes
7/88 ... yes
7/89 ... yes
7/90 ... yes
7/91 ... yes
7/92 ... yes
7/93 ... yes
7/94 ... yes
7/95 ... yes
7/96 ... yes
Redis version >= 2.8.0? ... yes
Ruby version >= 2.5.3 ? ... yes (2.5.3)
Git version >= 2.18.0 ? ... yes (2.18.1)
Git user has default SSH configuration? ... no
Try fixing it:
mkdir ~/gitlab-check-backup-1568203251
sudo mv /var/opt/gitlab/.ssh/id_rsa ~/gitlab-check-backup-1568203251
sudo mv /var/opt/gitlab/.ssh/id_rsa.pub ~/gitlab-check-backup-1568203251
For more information see:
doc/ssh/README.md in section "SSH on the GitLab server"
Please fix the error above and rerun the checks.
Active users: ... 2
Checking GitLab App ... Finished
Checking GitLab subtasks ... Finished