The form contains the following error namespace is not valid gitlab

Summary After upgrading from 13.0.4 to 13.1.3, I'm not able anymore to create a project.
Skip to content



Open


Issue created Jul 08, 2020 by Alberto Benini@alberto.benini

Project Creation: Namespace is not valid

Summary

After upgrading from 13.0.4 to 13.1.3, I’m not able anymore to create a project.

Steps to reproduce

na

What is the current bug behavior?

  1. Selecting any groups the «New Project» button is disappeared; only «New subgroup» button is visible
  2. Only from Admin Area, «New Project» button is available, but selecting any group (also a new group) as namespace, the New Project Creation fails with the error «The form contains the following error: Namespace is not valid«

What is the expected correct behavior?

  1. Selecting any groups the «New Project» button is visible
  2. Selecting any group as namespace, the New Project creation successed without error

Relevant logs and/or screenshots

# grep -r test-project-creation *
gitaly/current:{"correlation_id":"8C3JjDbT6I6","error":"rpc error: code = NotFound desc = GetRepoPath: not a git repository '/var/opt/gitlab/git-data/repositories/test-project-creation.git'","grpc.code":"NotFound","grpc.meta.auth_version":"v2","grpc.meta.client_name":"gitlab-web","grpc.meta.deadline_type":"regular","grpc.method":"FindDefaultBranchName","grpc.request.deadline":"2020-07-08T10:29:59Z","grpc.request.fullMethod":"/gitaly.RefService/FindDefaultBranchName","grpc.request.glProjectPath":"test-project-creation","grpc.request.glRepository":"project-","grpc.request.repoPath":"test-project-creation.git","grpc.request.repoStorage":"default","grpc.request.topLevelGroup":"","grpc.service":"gitaly.RefService","grpc.start_time":"2020-07-08T10:29:49Z","grpc.time_ms":0.17,"level":"info","msg":"finished unary call with code NotFound","peer.address":"@","pid":28259,"span.kind":"server","system":"grpc","time":"2020-07-08T10:29:49.036Z"}
gitaly/current:{"correlation_id":"8C3JjDbT6I6","grpc.code":"OK","grpc.meta.auth_version":"v2","grpc.meta.client_name":"gitlab-web","grpc.meta.deadline_type":"regular","grpc.method":"RepositoryExists","grpc.request.deadline":"2020-07-08T10:29:59Z","grpc.request.fullMethod":"/gitaly.RepositoryService/RepositoryExists","grpc.request.glProjectPath":"test-project-creation","grpc.request.glRepository":"project-","grpc.request.repoPath":"test-project-creation.git","grpc.request.repoStorage":"default","grpc.request.topLevelGroup":"","grpc.service":"gitaly.RepositoryService","grpc.start_time":"2020-07-08T10:29:49Z","grpc.time_ms":0.036,"level":"info","msg":"finished unary call with code OK","peer.address":"@","pid":28259,"span.kind":"server","system":"grpc","time":"2020-07-08T10:29:49.037Z"}
gitlab-rails/production.log:  Parameters: {"utf8"=>"✓", "authenticity_token"=>"[FILTERED]", "project"=>{"ci_cd_only"=>"false", "name"=>"test-project-creation", "namespace_id"=>"347", "path"=>"test-project-creation", "description"=>"[FILTERED]", "visibility_level"=>"0", "initialize_with_readme"=>"1"}}
gitlab-rails/production_json.log:{"method":"POST","path":"/projects","format":"html","controller":"ProjectsController","action":"create","status":200,"time":"2020-07-08T10:29:49.057Z","params":[{"key":"utf8","value":"✓"},{"key":"authenticity_token","value":"[FILTERED]"},{"key":"project","value":{"ci_cd_only":"false","name":"test-project-creation","namespace_id":"347","path":"test-project-creation","description":"[FILTERED]","visibility_level":"0","initialize_with_readme":"1"}}],"remote_ip":"10.2.251.63","user_id":2,"username":"Beninia","ua":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36","correlation_id":"8C3JjDbT6I6","meta.user":"Beninia","meta.caller_id":"ProjectsController#create","gitaly_calls":2,"gitaly_duration_s":0.002412,"redis_calls":17,"redis_duration_s":0.002512,"redis_read_bytes":1573,"redis_write_bytes":2765,"redis_cache_calls":16,"redis_cache_duration_s":0.002324,"redis_cache_read_bytes":1392,"redis_cache_write_bytes":2181,"redis_shared_state_calls":1,"redis_shared_state_duration_s":0.000188,"redis_shared_state_read_bytes":181,"redis_shared_state_write_bytes":584,"cpu_s":0.14,"db_duration_s":0.01422,"view_duration_s":0.10332,"duration_s":0.14249}

Results of GitLab environment info

Expand for output related to the GitLab environment info

System information System: Current User: git Using RVM: no Ruby Version: 2.6.6p146 Gem Version: 2.7.10 Bundler Version:1.17.3 Rake Version: 12.3.3 Redis Version: 5.0.9 Git Version: 2.27.0 Sidekiq Version:5.2.7 Go Version: unknown

GitLab information Version: 13.1.3 Revision: 8411f47246f Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: PostgreSQL DB Version: 11.7 URL: https://gitlab.int.master.lan HTTP Clone URL: https://gitlab.int.master.lan/some-group/some-project.git SSH Clone URL: git@gitlab.int.master.lan:some-group/some-project.git Using LDAP: yes Using Omniauth: yes Omniauth Providers:

GitLab Shell Version: 13.3.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

Results of GitLab application Check

Expand for output related to the GitLab application check

Checking GitLab subtasks ...

Checking GitLab Shell ...

GitLab Shell: ... GitLab Shell version >= 13.3.0 ? ... OK (13.3.0) Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Internal API available: OK Redis available via internal API: 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: ... Server: ldapmain LDAP authentication... Success LDAP users with access to your GitLab server (only showing the first 100 results) User output sanitized. Found 100 users of 100 limit.

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: ... 24/1 ... yes 24/3 ... yes 24/5 ... yes 24/6 ... yes 25/8 ... yes 25/13 ... yes 24/14 ... yes 24/15 ... yes 25/16 ... yes 24/17 ... yes 24/18 ... yes 24/19 ... yes 26/20 ... yes 26/21 ... yes 26/22 ... yes 26/23 ... yes 26/24 ... yes 24/25 ... yes 24/26 ... yes 24/27 ... yes 24/28 ... yes 45/29 ... yes 24/30 ... yes 24/31 ... yes 24/32 ... yes 24/33 ... yes 24/34 ... yes 24/36 ... yes 24/37 ... yes 24/38 ... yes 24/39 ... yes 24/40 ... yes 89/49 ... yes 89/50 ... yes 89/52 ... yes 89/53 ... yes 89/54 ... yes 89/58 ... yes 89/59 ... yes 89/60 ... yes 89/62 ... yes 89/64 ... yes 89/65 ... yes 114/66 ... yes 89/67 ... yes 114/68 ... yes 114/69 ... yes 89/70 ... yes 24/71 ... yes 24/72 ... yes 24/73 ... yes 26/74 ... yes 24/75 ... yes 24/76 ... yes 89/77 ... yes 45/78 ... yes 45/79 ... yes 45/80 ... yes 45/81 ... yes 45/82 ... yes 45/83 ... yes 45/84 ... yes 45/85 ... yes 45/86 ... yes 45/87 ... yes 45/88 ... yes 45/89 ... yes 45/90 ... yes 45/91 ... yes 45/92 ... yes 268/93 ... yes 179/94 ... yes 184/95 ... yes 45/96 ... yes 24/97 ... yes 24/98 ... yes 90/99 ... yes 209/100 ... yes 209/101 ... yes 209/102 ... yes 24/103 ... yes 25/104 ... yes 25/105 ... yes 24/106 ... yes 24/107 ... yes 24/108 ... yes 89/109 ... yes 89/110 ... yes 89/111 ... yes 89/112 ... yes 45/113 ... yes 45/114 ... yes 24/115 ... yes 24/116 ... yes 45/117 ... yes 45/118 ... yes 268/120 ... yes 247/121 ... yes 289/122 ... yes 247/123 ... yes 247/124 ... yes 89/125 ... yes 45/126 ... yes 24/127 ... yes 268/128 ... yes 89/129 ... yes 89/130 ... yes 268/131 ... yes 89/132 ... yes 89/133 ... yes 45/134 ... yes 45/135 ... yes 256/136 ... yes 289/137 ... yes 289/138 ... yes 45/139 ... yes 45/140 ... yes 268/141 ... yes 268/142 ... yes 24/143 ... yes 268/144 ... yes 45/145 ... yes 45/146 ... yes 45/147 ... yes 26/148 ... yes 319/149 ... yes 328/150 ... yes 328/151 ... yes 322/152 ... yes 322/153 ... yes 322/154 ... yes 322/155 ... yes 321/156 ... yes 321/157 ... yes 321/158 ... yes 323/159 ... yes 323/160 ... yes 324/161 ... yes 324/162 ... yes 325/163 ... yes 325/164 ... yes 327/165 ... yes 327/166 ... yes 327/167 ... yes 25/168 ... yes 45/169 ... yes 24/170 ... yes 342/171 ... yes 342/172 ... yes 342/173 ... yes Redis version >= 4.0.0? ... yes Ruby version >= 2.5.3 ? ... yes (2.6.6) Git version >= 2.22.0 ? ... yes (2.27.0) Git user has default SSH configuration? ... yes Active users: ... 298 Is authorized keys file accessible? ... yes GitLab configured to store new projects in hashed storage? ... yes All projects are in hashed storage? ... yes

Checking GitLab App ... Finished

Checking GitLab subtasks ... Finished

Possible fixes

No idea

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and
privacy statement. We’ll occasionally send you account related emails.

Already on GitHub?
Sign in
to your account

Assignees

@lorenzo-cavazzi

Comments

@pameladelgado

Description
When user can’t create new projects on Gitlab, Renku displays error namespace: is not valid

To Reproduce
Steps to reproduce the behaviour:

  1. Go to https://dev.renku.ch/ or any other Renku deployment and login with a user that doesn’t have the rights to create new projects
  2. Go to Project —> New Project
  3. See error in screenshots, project can’t be created because user can’t create new projects on gitlab but error message is incorrect namespace: is not valid

Expected behavior
A more meaningful error should be displayed user reached the project limit, see second screenshot.

Screenshots
Error message when creating a new project on Renku:
limit-namespace-display

Warning message on Gitlab:
limit-gitlab-error

Additional information
This happens in any Renku deployment.

@lorenzo-cavazzi

The error message you see is actually very close to the one currently returned by the POST /projects GitLab API

{"message":{"namespace":["is not valid"],"limit_reached":[]}}

We currently filter error messages without explanation, this is why no reference to the reached limit is displayed. I suggest to do as follows:

  • Display all error message, even without explanation. In this case it will display something like
    Screenshot_20191029_144107
  • If this is a common error, we can easily display something more informative to the user. I’ll create a PR with a proposed solution

@pameladelgado



Copy link


Contributor

Author

Ok I see.
Although it would be nice to get a meaningful error for the user, I understand that it is not practical to translate all GitLab errors into user friendly feedback.
For me, having all the errors displayed including the ones without explanation is better than filtering them. For instance, limit_reached would have definitely make me think that something else than the gitlab version was the cause of the problem.

In addition to your suggestion I think we could specify where/when the error comes from. In this case is Gitlab and not the user or Renku. For errors in GitLab we could maybe even refer the users to test creating/forking a project in GitLab to see more details.

Thanks for looking into this issue.

@lorenzo-cavazzi

You are right, handling all the errors is practically impossible, but we can still display something more user-friendly for the most common cases.

I am not sure if we want to suggest users trying out things in GitLab for debugging errors. Anyway, the process of creating a new project in the UI will change soon as part of SwissDataScienceCenter/renku#611 and we will make sure to make errors more understandable.

WebGitLab has two types of namespaces: A personal namespace, which is based on your username and provided to you when you create your account. You cannot create …
From docs.gitlab.com
See details »

WebFor various reasons, the created Customers Portal account is not linked to a GitLab account. For example: The subscription has not yet been applied to a group. Support …
From about.gitlab.com
See details »


GITLAB: HOW TO ALLOW USER TO CREATE PROJECT UNDER A GROUP …

WebSep 1, 2015 1st option you have is to change by yourself the namespace after the developer created the project: project -> settings/gear icon -> edit project -> transfer …
From stackoverflow.com
See details »


PROJECT CREATION: NAMESPACE IS NOT VALID — GITLAB

WebSelecting any groups the «New Project» button is disappeared; only «New subgroup» button is visible Only from Admin Area, «New Project» button is available, but selecting any …
From gitlab.com
See details »


ADMINS GET MISLEADING ERROR MESSAGE WHILE CREATING A PROJECT

WebUsing /projects/new and selecting my username as namespace, i get the following error: The form contains the following error: Namespace is not valid Creating Projects for …
From gitlab.com
See details »


NAMESPACE IS NOT VALID (#216257) · ISSUES — GITLAB

WebNamespace is not valid Summary New personal project creation, under user’s own personal profile, throws «Namespace is not valid» errors for type:external users. Steps …
From gitlab.com
See details »


ERROR 500 — EXCEPTION: INVALID SINGLE-TABLE INHERITANCE … — GITLAB …

WebAug 9, 2022 Hi all, I have some issue after my attempt to upgrade to 14.6.x from 14.0 and realized that there’s an additional steps and can’t simply upgrade directly 🙁 I also tried to …
From forum.gitlab.com
See details »


GITLAB-CI KUBERNETES CLUSTER DOESN’T CREATE NAMESPACE (JOB FAILED …

WebNov 15, 2021 namespace_overwrite_allowed is not overwriting namespaces, but it is validation that namespace will be overwritten, anyways you have to check that your …
From stackoverflow.com
See details »


CAN’T CREATE PROJECT «NAMESPACE IS NOT VALID» (#39078)

WebDec 6, 2019 We have the same Issue: Exported from GitLab 12.6.0 ee and tried to import in GitLab 12.6.1 ce. Error: «Project could not be imported: Namespace is not valid» …
From gitlab.com
See details »


CAN’T BUILD, INVALID NAMESPACE NAME #67 — GITHUB

WebMay 30, 2014 frankgerhardt commented on May 30, 2014. sameersbn closed this as completed on Jun 2, 2014. phpb-com added a commit to gotfix/docker-gitlab that …
From github.com
See details »


GITLAB AUTODEVOPS FUNCTION ENSURE_NAMESPACE() DOES NOT …

WebCreate an AutoDevops application with the namespace «foo». Create a namespace in Kubernetes called «foo-bar» Deploy to the cluster. Alternatively to reproduce only using …
From gitlab.com
See details »


PROJECT CREATION/TRANSFER FAILED: NAMESPACE IS NOT VALID

WebJul 9, 2020 Only from Admin Area, “New Project” button is available, but selecting any group (also a new group) as namespace, the New Project Creation fails with the error …
From forum.gitlab.com
See details »


THE FORM CONTAINS THE FOLLOWING ERROR: NAMESPACE IS NOT …

WebThe form contains the following error: Namespace is not valid (#23768) · Issues · GitLab.org / GitLab · GitLab GitLab.org GitLab Issues #23768 An error occurred while …
From gitlab.com
See details »


FORKING A PROJECT SHOWS NO NAMESPACES — GITLAB

WebSep 20, 2021 I am trying to fork a project but no namespaces are listed. Steps to reproduce I am not sure if this is the correct sequence, but this is my current setup. …
From gitlab.com
See details »


Related Search


CREATE NEW PROJECT IN SELF-HOSTED GITLAB INSTANCE

Web Aug 14, 2019 Go to your group’s settings page, similar to: https://gitlab.com/groups/groupname/-/edit Expand the » Permissions, LFS, 2FA » …
From stackoverflow.com
Reviews 1


404 WHEN CREATING NEW PROJECT IN A GROUP THAT CONTAINS … — GITLAB …

Web Jun 19, 2020 Hi everyone, When trying to create a new project under a group (that contains already 7 others), I obtain a 404 page not found. Trying another method, …
From forum.gitlab.com


EXCEPTION: INVALID SINGLE-TABLE INHERITANCE TYPE: USER IS NOT A …

Web May 31, 2022 I run the Gitlab Omnibus docker container. The other day I restarted it and moved up to the latest version. ( 14.3.6-ce.0, i think) Now I can’t login and I get errors …
From forum.gitlab.com


ERROR 500 — EXCEPTION: INVALID SINGLE-TABLE INHERITANCE … — GITLAB …

Web Aug 9, 2022 FryShadow March 2, 2022, 2:09am #1 Hi all, I have some issue after my attempt to upgrade to 14.6.x from 14.0 and realized that there’s an additional steps and …
From forum.gitlab.com


ASSOCIATING A SUBSCRIPTION WITH A NAMESPACE & TROUBLESHOOTING

Web If there is an outstanding fee at step 10, go to the admin view > namespaces tab. You should see the namespace and a drop-down for the plans. Select the relevant plan and …
From about.gitlab.com


GITLAB: HOW TO ALLOW USER TO CREATE PROJECT UNDER A GROUP …

Web Sep 1, 2015 2 1st option you have is to change by yourself the namespace after the developer created the project: project -> settings/gear icon -> edit project -> transfer …
From stackoverflow.com


TROUBLESHOOTING LDAP | GITLAB

Web Learn GitLab with tutorials. Choose a subscription. Install GitLab. Install GitLab Runner. Integrate applications. Administer GitLab. Use GitLab. Use the API. Contribute to …
From docs.gitlab.com


THE FORM CONTAINS THE FOLLOWING ERROR: NAMESPACE IS NOT VALID

Web The form contains the following error: Namespace is not valid (#23768) · Issues · GitLab.org / GitLab · GitLab GitLab.org GitLab Issues #23768 An error occurred while …
From gitlab.com


PROJECT CREATION/TRANSFER FAILED: NAMESPACE IS NOT VALID — GITLAB …

Web Jul 9, 2020 Only from Admin Area, “New Project” button is available, but selecting any group (also a new group) as namespace, the New Project Creation fails with the error …
From forum.gitlab.com


GITLAB PAGES DOMAIN NAMES, URLS, AND BASE URLS | GITLAB

Web GitLab Pages default domain names. If you use your own GitLab instance to deploy your site with GitLab Pages, verify your Pages wildcard domain with your sysadmin. This …
From docs.gitlab.com


NAMESPACE ERROR — HOW TO USE GITLAB — GITLAB FORUM

Web Apr 19, 2021 The form contains the following error: Namespace is not valid I am try to create a project in a private group but I am getting above error. I am a member of a …
From forum.gitlab.com


CAN’T CREATE PROJECT «NAMESPACE IS NOT VALID» (#39078)

Web Dec 6, 2019 Just logged it, went to new project, Import Project, GetLab Export, gave it the name of «mca-db» & selected my exported file. Possible workarounds create a group …
From gitlab.com


NAMESPACES | GITLAB

Web GitLab has two types of namespaces: A personal namespace, which is based on your username and provided to you when you create your account. You cannot create …
From docs.gitlab.com


«NAMESPACE IS NOT VALID» ERROR WHEN TRYING TO CREATE A …

Web «Namespace is not valid» error when trying to create a project through the admin area Steps to reproduce Create a group called «my-test-perms-group» In Settings > …
From gitlab.com


NAMESPACE IS NOT VALID (#216257) · ISSUES — GITLAB

Web Namespace is not valid Summary New personal project creation, under user’s own personal profile, throws «Namespace is not valid» errors for type:external users. Steps …
From gitlab.com


Содержание

  1. «Отпечаток пальца не может быть сгенерирован» при добавлении нового ключа SSH в учетную запись gitlab
  2. Отпечаток пальца уже был взят gitlab
  3. 7 ответов
  4. сделать новый ключ
  5. Documentation
  6. System check framework¶
  7. API reference¶
  8. CheckMessage ¶
  9. Builtin tags¶
  10. Core system checks¶
  11. Asynchronous support¶
  12. Backwards compatibility¶
  13. Caches¶
  14. Database¶
  15. MySQL and MariaDB¶
  16. Managing files¶
  17. Model fields¶
  18. File fields¶
  19. Related fields¶
  20. Models¶
  21. Security¶
  22. Signals¶
  23. Templates¶
  24. Translation¶
  25. contrib app checks¶
  26. admin ¶
  27. ModelAdmin ¶
  28. InlineModelAdmin ¶
  29. GenericInlineModelAdmin ¶
  30. AdminSite ¶
  31. contenttypes ¶
  32. postgres ¶
  33. sites ¶

«Отпечаток пальца не может быть сгенерирован» при добавлении нового ключа SSH в учетную запись gitlab

Я пытаюсь добавить новый ключ ssh в свою учетную запись GitLab, но продолжаю получать следующие ошибки:

Что я сделал, так это пошел в Cmder и ввел команды

Затем я скопировал ключ в свою школьную учетную запись GitLab через веб-браузер и получил упомянутые выше ошибки.

Почему это происходит и как я могу успешно загрузить свой ключ?

Удалось ли вам заставить это работать с любым из ответов, показанных ниже? Если да, не забудьте принять это. Это показывает другим пользователям, что вы нашли решение.

Вам нужно сделать следующее вместо просто ssh-keygen :

Это создает ключ ED25519, который можно использовать с Gitlab. Обязательно измените адрес электронной почты на свой адрес электронной почты (связанный с учетной записью gitlab). Затем возьмите только что сгенерированный ключ .pub и скопируйте его в то же место, где вы были раньше.

Я попробовал именно то, что вы сказали, но все еще получаю те же ошибки.

@DávidČano Попробуйте: ssh-keygen -t ed25519 -C «email@example.com» Это рекомендуемый тип ключа; ЭД25519.

Наконец-то это сработало, большое спасибо! Вы только что спасли мой рассудок.

@DávidČano Я отредактировал свой ответ, чтобы отразить правильные шаги. Не могли бы вы представить его в качестве ответа, если считаете, что он отвечает на ваш вопрос?

Ключи RSA должны быть в порядке. Это один из типов ключей, перечисленных в сообщении об ошибке.

Есть большая вероятность, что вы копируете и вставляете символы новой строки из упаковки ключей в терминале, которых там не должно быть.

Когда вы вставляете свой ключ, он должен быть одной строкой. Вероятно, он начинается с ssh-rsa (если вы сгенерируете ключ RSA; другие типы ключей будут начинаться аналогично) и заканчивается чем-то вроде you@machine . Должен быть пробел после ssh-rsa и один перед you@machine , но не должно быть новых строк.

Либо вручную удалите новые строки при вставке, либо откройте файл в соответствующем текстовом редакторе, где вы сможете скопировать его без новых строк.

Я получил ту же ошибку, затем использовал ключ SSH, сгенерированный terraform, и использовал вывод:

Источник

Отпечаток пальца уже был взят gitlab

я отформатировал свой ноутбук Windows 7 и в попытке снова настроить git, я установил Git и исходное дерево приложений.

Я удалил ключ SSH из gitlab и восстановил ключ с помощью ssh-keygen. Но когда я пытаюсь добавить ключ SSH в gitlab, он выдает следующее исключение:

из-за чего я не могу клонировать репозиторий git из приложения исходного дерева, поскольку он не может аутентифицировать ключ SSH.Я следил за запросами в google группы gitlab, но ни одна из них, похоже, не решает мою проблему. Есть ли обходной путь или шаги, чтобы получить ключ SSH, принятый gitlab?

7 ответов

убедитесь, что отрезали все в конце строки, закодированной в base64. Также удалите все новые строки, чтобы строка не содержала новых строк.

Это сделал трюк для меня.

Я пробовал все, что уже предлагалось, и ничего не получилось. В итоге мне пришлось копировать открытый ключ с помощью команды, а не из текстового редактора ( nano в моем случае):

замена, при необходимости, id_rsa С моим конкретным именем ключа. Вышеуказанная команда работает на OSX. Другие системы требуют другой команды, и они перечислены на следующей странице:http://doc.gitlab.com/ce/ssh/README.html.

текстовый редактор может быть проблема. Попробуйте открыть ключевой файл с помощью Notepad, а не Notepad++.

также добавьте «ssh-rsa» в начале ключа.

сделать новый ключ

ни одно из вышеперечисленных решений не сработало для меня, поэтому я скопировал свой старый ключ и создал новый.

в моем случае мой открытый ключ должен быть каким-то образом прикреплен к определенному репозиторию.

Я вернулся и удалил два старых репозитория, и после этого он позволил мне добавить открытый ключ к моей учетной записи GitLab без каких-либо проблем.

Добавить новый ключ ssh В pervius ключ SSH использовать прабабцею другим пользователем . Когда кто-то еще использует ключ ssh, вы должны получить эту ошибку, не беспокойтесь, создайте новый ключ ssh и используйте тему.

Gitlab может использовать ваш ssh-ключ в другой учетной записи ваших прошлых проектов, так что самый простой способ решить эту проблему-создать новую ssh-пару, добавить ее в ssh-agent и добавить id_rsa2.pub для вашей учетной записи gitlab.

Источник

Documentation

System check framework¶

The system check framework is a set of static checks for validating Django projects. It detects common problems and provides hints for how to fix them. The framework is extensible so you can easily add your own checks.

For details on how to add your own checks and integrate them with Django’s system checks, see the System check topic guide .

API reference¶

CheckMessage ¶

The warnings and errors raised by system checks must be instances of CheckMessage . An instance encapsulates a single reportable error or warning. It also provides context and hints applicable to the message, and a unique identifier that is used for filtering purposes.

Constructor arguments are:

level The severity of the message. Use one of the predefined values: DEBUG , INFO , WARNING , ERROR , CRITICAL . If the level is greater or equal to ERROR , then Django will prevent management commands from executing. Messages with level lower than ERROR (i.e. warnings) are reported to the console, but can be silenced. msg A short (less than 80 characters) string describing the problem. The string should not contain newlines. hint A single-line string providing a hint for fixing the problem. If no hint can be provided, or the hint is self-evident from the error message, the hint can be omitted, or a value of None can be used. obj Optional. An object providing context for the message (for example, the model where the problem was discovered). The object should be a model, field, or manager or any other object that defines a __str__() method. The method is used while reporting all messages and its result precedes the message. id Optional string. A unique identifier for the issue. Identifiers should follow the pattern applabel.X001 , where X is one of the letters CEWID , indicating the message severity ( C for criticals, E for errors and so). The number can be allocated by the application, but should be unique within that application.

There are subclasses to make creating messages with common levels easier. When using them you can omit the level argument because it is implied by the class name.

class Debug ( msg , hint = None , obj = None , id = None )¶ class Info ( msg , hint = None , obj = None , id = None )¶ class Warning ( msg , hint=None obj=None , id=None )¶ class Error ( msg , hint = None , obj = None , id = None )¶ class Critical ( msg , hint = None , obj = None , id = None

Django’s system checks are organized using the following tags:

  • admin : Checks of any admin site declarations.
  • async_support : Checks asynchronous-related configuration.
  • caches : Checks cache related configuration.
  • compatibility : Flags potential problems with version upgrades.
  • database : Checks database-related configuration issues. Database checks are not run by default because they do more than static code analysis as regular checks do. They are only run by the migrate command or if you specify configured database aliases using the —database option when calling the check command.
  • files : Checks files related configuration.
  • models : Checks of model, field, and manager definitions.
  • security : Checks security related configuration.
  • signals : Checks on signal declarations and handler registrations.
  • sites : Checks django.contrib.sites configuration.
  • staticfiles : Checks django.contrib.staticfiles configuration.
  • templates : Checks template related configuration.
  • translation : Checks translation related configuration.
  • urls : Checks URL configuration.

Some checks may be registered with multiple tags.

The files tag was added.

Core system checks¶

Asynchronous support¶

The following checks verify your setup for Asynchronous support :

  • async.E001: You should not set the DJANGO_ALLOW_ASYNC_UNSAFE environment variable in deployment. This disables async safety protection .

Backwards compatibility¶

Compatibility checks warn of potential problems that might occur after upgrading Django.

    2_0.W001: Your URL pattern

has a route that contains (?P , begins with a ^ , or ends with a $ . This was likely an oversight when migrating from url() to path() .

  • 4_0.E001: As of Django 4.0, the values in the CSRF_TRUSTED_ORIGINS setting must start with a scheme (usually http:// or https:// ) but found .
  • Caches¶

    The following checks verify that your CACHES setting is correctly configured:

    • caches.E001: You must define a ‘default’ cache in your CACHES setting.
    • caches.W002: Your configuration might expose your cache or lead to corruption of your data because its LOCATION matches/is inside/contains MEDIA_ROOT / STATIC_ROOT / STATICFILES_DIRS .
    • caches.W003: Your cache LOCATION is relative. Use an absolute path instead.

    Database¶

    MySQL and MariaDB¶

    If you’re using MySQL or MariaDB, the following checks will be performed:

    • mysql.E001: MySQL/MariaDB does not allow unique CharField s to have a max_length > 255. This check was changed to mysql.W003 in Django 3.1 as the real maximum size depends on many factors.
    • mysql.W002: MySQL/MariaDB Strict Mode is not set for database connection . See also Setting sql_mode .
    • mysql.W003: MySQL/MariaDB may not allow unique CharField s to have a max_length > 255.

    Managing files¶

    The following checks verify your setup for Managing files :

      files.E001: The FILE_UPLOAD_TEMP_DIR setting refers to the nonexistent directory

    Model fields¶

    • fields.E001: Field names must not end with an underscore.
    • fields.E002: Field names must not contain «__» .
    • fields.E003: pk is a reserved word that cannot be used as a field name.
    • fields.E004: choices must be an iterable (e.g., a list or tuple).
    • fields.E005: choices must be an iterable containing (actual value, human readable name) tuples.
    • fields.E006: db_index must be None , True or False .
    • fields.E007: Primary keys must not have null=True .
    • fields.E008: All validators must be callable.
    • fields.E009: max_length is too small to fit the longest value in choices ( characters).
    • fields.E010: default should be a callable instead of an instance so that it’s not shared between all field instances.
    • fields.E100: AutoField s must set primary_key=True.
    • fields.E110: BooleanField s do not accept null values. This check appeared before support for null values was added in Django 2.1.
    • fields.E120: CharField s must define a max_length attribute.
    • fields.E121: max_length must be a positive integer.
    • fields.W122: max_length is ignored when used with field type> .
    • fields.E130: DecimalField s must define a decimal_places attribute.
    • fields.E131: decimal_places must be a non-negative integer.
    • fields.E132: DecimalField s must define a max_digits attribute.
    • fields.E133: max_digits must be a positive integer.
    • fields.E134: max_digits must be greater or equal to decimal_places .
    • fields.E140: FilePathField s must have either allow_files or allow_folders set to True.
    • fields.E150: GenericIPAddressField s cannot have blank=True if null=False , as blank values are stored as nulls.
    • fields.E160: The options auto_now , auto_now_add , and default are mutually exclusive. Only one of these options may be present.
    • fields.W161: Fixed default value provided.
    • fields.W162: does not support a database index on data type> columns.
    • fields.E170: BinaryField ’s default cannot be a string. Use bytes content instead.
    • fields.E180: does not support JSONField s.
    • fields.E190: does not support a database collation on s.
    • fields.E900: IPAddressField has been removed except for support in historical migrations.
    • fields.W900: IPAddressField has been deprecated. Support for it (except in historical migrations) will be removed in Django 1.9. This check appeared in Django 1.7 and 1.8.
    • fields.W901: CommaSeparatedIntegerField has been deprecated. Support for it (except in historical migrations) will be removed in Django 2.0. This check appeared in Django 1.10 and 1.11.
    • fields.E901: CommaSeparatedIntegerField is removed except for support in historical migrations.
    • fields.W902: FloatRangeField is deprecated and will be removed in Django 3.1. This check appeared in Django 2.2 and 3.0.
    • fields.W903: NullBooleanField is deprecated. Support for it (except in historical migrations) will be removed in Django 4.0. This check appeared in Django 3.1 and 3.2.
    • fields.E903: NullBooleanField is removed except for support in historical migrations.
    • fields.W904: django.contrib.postgres.fields.JSONField is deprecated. Support for it (except in historical migrations) will be removed in Django 4.0. This check appeared in Django 3.1 and 3.2.
    • fields.E904: django.contrib.postgres.fields.JSONField is removed except for support in historical migrations.

    File fields¶

    • fields.E200: unique is not a valid argument for a FileField . This check is removed in Django 1.11.
    • fields.E201: primary_key is not a valid argument for a FileField .
    • fields.E202: FileField ’s upload_to argument must be a relative path, not an absolute path.
    • fields.E210: Cannot use ImageField because Pillow is not installed.
    • fields.E300: Field defines a relation with model , which is either not installed, or is abstract.
    • fields.E301: Field defines a relation with the model . which has been swapped out.
    • fields.E302: Reverse accessor model>. name> for . . name> clashes with field name . . name> .
    • fields.E303: Reverse query name for . . name> clashes with field name . . name> .
    • fields.E304: Reverse accessor model>. name> for . . name> clashes with reverse accessor for . . name> .
    • fields.E305: Reverse query name for . . name> clashes with reverse query name for . . name> .
    • fields.E306: The name is invalid related_name for field . name> .
    • fields.E307: The field label>. . name> was declared with a lazy reference to label>. , but app label> isn’t installed or doesn’t provide model .
    • fields.E308: Reverse query name query name> must not end with an underscore.
    • fields.E309: Reverse query name query name> must not contain ‘__’ .
    • fields.E310: No subset of the fields , , … on model is unique.
    • fields.E311: . name> must be unique because it is referenced by a ForeignKey .
    • fields.E312: The to_field name> doesn’t exist on the related model label>. .
    • fields.E320: Field specifies on_delete=SET_NULL , but cannot be null.
    • fields.E321: The field specifies on_delete=SET_DEFAULT , but has no default value.
    • fields.E330: ManyToManyField s cannot be unique.
    • fields.E331: Field specifies a many-to-many relation through model , which has not been installed.
    • fields.E332: Many-to-many fields with intermediate tables must not be symmetrical. This check appeared before Django 3.0.
    • fields.E333: The model is used as an intermediate model by , but it has more than two foreign keys to , which is ambiguous. You must specify which two foreign keys Django should use via the through_fields keyword argument.
    • fields.E334: The model is used as an intermediate model by , but it has more than one foreign key from , which is ambiguous. You must specify which foreign key Django should use via the through_fields keyword argument.
    • fields.E335: The model is used as an intermediate model by , but it has more than one foreign key to , which is ambiguous. You must specify which foreign key Django should use via the through_fields keyword argument.
    • fields.E336: The model is used as an intermediary model by , but it does not have foreign key to or .
    • fields.E337: Field specifies through_fields but does not provide the names of the two link fields that should be used for the relation through .
    • fields.E338: The intermediary model has no field name> .
    • fields.E339: . name> is not a foreign key to .
    • fields.E340: The field’s intermediary table
      clashes with the table name of / . name> .
    • fields.W340: null has no effect on ManyToManyField .
    • fields.W341: ManyToManyField does not support validators .
    • fields.W342: Setting unique=True on a ForeignKey has the same effect as using a OneToOneField .
    • fields.W343: limit_choices_to has no effect on ManyToManyField with a through model. This check appeared before Django 4.0.
    • fields.W344: The field’s intermediary table
    • fields.W345: related_name has no effect on ManyToManyField with a symmetrical relationship, e.g. to “self”.
    • Models¶

      • models.E001: is not of the form app_label.app_name .
      • models.E002: references , which has not been installed, or is abstract.
      • models.E003: The model has two identical many-to-many relations through the intermediate model . .
      • models.E004: id can only be used as a field name if the field also sets primary_key=True .
      • models.E005: The field name> from parent model clashes with the field name> from parent model .
      • models.E006: The field name> clashes with the field name> from model .
      • models.E007: Field name> has column name name> that is used by another field.
      • models.E008: index_together must be a list or tuple.
      • models.E009: All index_together elements must be lists or tuples.
      • models.E010: unique_together must be a list or tuple.
      • models.E011: All unique_together elements must be lists or tuples.
      • models.E012: constraints/indexes/index_together/unique_together refers to the nonexistent field name> .
      • models.E013: constraints/indexes/index_together/unique_together refers to a ManyToManyField name> , but ManyToManyField s are not supported for that option.
      • models.E014: ordering must be a tuple or list (even if you want to order by only one field).
      • models.E015: ordering refers to the nonexistent field, related field, or lookup name> .
      • models.E016: constraints/indexes/index_together/unique_together refers to field which is not local to model .
      • models.E017: Proxy model contains model fields.
      • models.E018: Autogenerated column name too long for field . Maximum length is length> for database .
      • models.E019: Autogenerated column name too long for M2M field field> . Maximum length is length> for database .
      • models.E020: The .check() class method is currently overridden.
      • models.E021: ordering and order_with_respect_to cannot be used together.
      • models.E022: contains a lazy reference to label>. , but app label> isn’t installed or doesn’t provide model .
      • models.E023: The model name cannot start or end with an underscore as it collides with the query lookup syntax.
      • models.E024: The model name cannot contain double underscores as it collides with the query lookup syntax.
      • models.E025: The property

      name> clashes with a related field accessor.

    • models.E026: The model cannot have more than one field with primary_key=True .
    • models.W027: does not support check constraints.
    • models.E028: db_table is used by multiple models: list> .
    • models.E029: index name is not unique for model .
    • models.E030: index name is not unique among models: list> .
    • models.E031: constraint name is not unique for model .
    • models.E032: constraint name is not unique among models: list> .
    • models.E033: The index name cannot start with an underscore or a number.
    • models.E034: The index name cannot be longer than characters.
    • models.W035: db_table is used by multiple models: list> .
    • models.W036: does not support unique constraints with conditions.
    • models.W037: does not support indexes with conditions.
    • models.W038: does not support deferrable unique constraints.
    • models.W039: does not support unique constraints with non-key columns.
    • models.W040: does not support indexes with non-key columns.
    • models.E041: constraints refers to the joined field name> .
    • models.W042: Auto-created primary key used when not defining a primary key type, by default django.db.models.AutoField .
    • models.W043: does not support indexes on expressions.
    • models.W044: does not support unique constraints on expressions.
    • models.W045: Check constraint contains RawSQL() expression and won’t be validated during the model full_clean() .
    • Security¶

      The security checks do not make your site secure. They do not audit code, do intrusion detection, or do anything particularly complex. Rather, they help perform an automated, low-hanging-fruit checklist, that can help you to improve your site’s security.

      Some of these checks may not be appropriate for your particular deployment configuration. For instance, if you do your HTTP to HTTPS redirection in a load balancer, it’d be irritating to be constantly warned about not having enabled SECURE_SSL_REDIRECT . Use SILENCED_SYSTEM_CHECKS to silence unneeded checks.

      The following checks are run if you use the check —deploy option:

      • security.W001: You do not have django.middleware.security.SecurityMiddleware in your MIDDLEWARE so the SECURE_HSTS_SECONDS , SECURE_CONTENT_TYPE_NOSNIFF , SECURE_REFERRER_POLICY , SECURE_CROSS_ORIGIN_OPENER_POLICY , and SECURE_SSL_REDIRECT settings will have no effect.
      • security.W002: You do not have django.middleware.clickjacking.XFrameOptionsMiddleware in your MIDDLEWARE , so your pages will not be served with an ‘x-frame-options’ header. Unless there is a good reason for your site to be served in a frame, you should consider enabling this header to help prevent clickjacking attacks.
      • security.W003: You don’t appear to be using Django’s built-in cross-site request forgery protection via the middleware ( django.middleware.csrf.CsrfViewMiddleware is not in your MIDDLEWARE ). Enabling the middleware is the safest approach to ensure you don’t leave any holes.
      • security.W004: You have not set a value for the SECURE_HSTS_SECONDS setting. If your entire site is served only over SSL, you may want to consider setting a value and enabling HTTP Strict Transport Security . Be sure to read the documentation first; enabling HSTS carelessly can cause serious, irreversible problems.
      • security.W005: You have not set the SECURE_HSTS_INCLUDE_SUBDOMAINS setting to True . Without this, your site is potentially vulnerable to attack via an insecure connection to a subdomain. Only set this to True if you are certain that all subdomains of your domain should be served exclusively via SSL.
      • security.W006: Your SECURE_CONTENT_TYPE_NOSNIFF setting is not set to True , so your pages will not be served with an ‘X-Content-Type-Options: nosniff’ header. You should consider enabling this header to prevent the browser from identifying content types incorrectly.
      • security.W007: Your SECURE_BROWSER_XSS_FILTER setting is not set to True , so your pages will not be served with an ‘X-XSS-Protection: 1; mode=block’ header. You should consider enabling this header to activate the browser’s XSS filtering and help prevent XSS attacks. This check is removed in Django 3.0 as the X-XSS-Protection header is no longer honored by modern browsers.
      • security.W008: Your SECURE_SSL_REDIRECT setting is not set to True . Unless your site should be available over both SSL and non-SSL connections, you may want to either set this setting to True or configure a load balancer or reverse-proxy server to redirect all connections to HTTPS.
      • security.W009: Your SECRET_KEY has less than 50 characters, less than 5 unique characters, or it’s prefixed with ‘django-insecure-‘ indicating that it was generated automatically by Django. Please generate a long and random value, otherwise many of Django’s security-critical features will be vulnerable to attack.
      • security.W010: You have django.contrib.sessions in your INSTALLED_APPS but you have not set SESSION_COOKIE_SECURE to True . Using a secure-only session cookie makes it more difficult for network traffic sniffers to hijack user sessions.
      • security.W011: You have django.contrib.sessions.middleware.SessionMiddleware in your MIDDLEWARE , but you have not set SESSION_COOKIE_SECURE to True . Using a secure-only session cookie makes it more difficult for network traffic sniffers to hijack user sessions.
      • security.W012: SESSION_COOKIE_SECURE is not set to True . Using a secure-only session cookie makes it more difficult for network traffic sniffers to hijack user sessions.
      • security.W013: You have django.contrib.sessions in your INSTALLED_APPS , but you have not set SESSION_COOKIE_HTTPONLY to True . Using an HttpOnly session cookie makes it more difficult for cross-site scripting attacks to hijack user sessions.
      • security.W014: You have django.contrib.sessions.middleware.SessionMiddleware in your MIDDLEWARE , but you have not set SESSION_COOKIE_HTTPONLY to True . Using an HttpOnly session cookie makes it more difficult for cross-site scripting attacks to hijack user sessions.
      • security.W015: SESSION_COOKIE_HTTPONLY is not set to True . Using an HttpOnly session cookie makes it more difficult for cross-site scripting attacks to hijack user sessions.
      • security.W016: CSRF_COOKIE_SECURE is not set to True . Using a secure-only CSRF cookie makes it more difficult for network traffic sniffers to steal the CSRF token.
      • security.W017: CSRF_COOKIE_HTTPONLY is not set to True . Using an HttpOnly CSRF cookie makes it more difficult for cross-site scripting attacks to steal the CSRF token. This check is removed in Django 1.11 as theCSRF_COOKIE_HTTPONLYsetting offers no practical benefit.
      • security.W018: You should not have DEBUG set to True in deployment.
      • security.W019: You have django.middleware.clickjacking.XFrameOptionsMiddleware in your MIDDLEWARE , but X_FRAME_OPTIONS is not set to ‘DENY’ . Unless there is a good reason for your site to serve other parts of itself in a frame, you should change it to ‘DENY’ .
      • security.W020: ALLOWED_HOSTS must not be empty in deployment.
      • security.W021: You have not set the SECURE_HSTS_PRELOAD setting to True . Without this, your site cannot be submitted to the browser preload list.
      • security.W022: You have not set the SECURE_REFERRER_POLICY setting. Without this, your site will not send a Referrer-Policy header. You should consider enabling this header to protect user privacy.
      • security.E023: You have set the SECURE_REFERRER_POLICY setting to an invalid value.
      • security.E024: You have set the SECURE_CROSS_ORIGIN_OPENER_POLICY setting to an invalid value.
      • security.W025: Your SECRET_KEY_FALLBACKS[n] has less than 50 characters, less than 5 unique characters, or it’s prefixed with ‘django-insecure-‘ indicating that it was generated automatically by Django. Please generate a long and random value, otherwise many of Django’s security-critical features will be vulnerable to attack.

      The following checks verify that your security-related settings are correctly configured:

      • security.E100: DEFAULT_HASHING_ALGORITHM must be ‘sha1’ or ‘sha256’ . This check appeared in Django 3.1 and 3.2.
      • security.E101: The CSRF failure view ‘path.to.view’ does not take the correct number of arguments.
      • security.E102: The CSRF failure view ‘path.to.view’ could not be imported.

      Signals¶

      • signals.E001: was connected to the signal with a lazy reference to the sender label>. , but app label> isn’t installed or doesn’t provide model .

      Templates¶

      The following checks verify that your TEMPLATES setting is correctly configured:

      • templates.E001: You have ‘APP_DIRS’: True in your TEMPLATES but also specify ‘loaders’ in OPTIONS . Either remove APP_DIRS or remove the ‘loaders’ option.
      • templates.E002: string_if_invalid in TEMPLATESOPTIONS must be a string but got: ( ).
      • templates.E003: is used for multiple template tag modules: list> . This check was changed to templates.W003 in Django 4.1.2.
      • templates.W003: is used for multiple template tag modules: list> .

      Translation¶

      The following checks are performed on your translation configuration:

      • translation.E001: You have provided an invalid value for the LANGUAGE_CODE setting: .
      • translation.E002: You have provided an invalid language code in the LANGUAGES setting: .
      • translation.E003: You have provided an invalid language code in the LANGUAGES_BIDI setting: .
      • translation.E004: You have provided a value for the LANGUAGE_CODE setting that is not in the LANGUAGES setting.

      The following checks are performed on your URL configuration:

        urls.W001: Your URL pattern

      uses include() with a route ending with a $ . Remove the dollar from the route to avoid problems including URLs.
      urls.W002: Your URL pattern

      has a route beginning with a / . Remove this slash as it is unnecessary. If this pattern is targeted in an include() , ensure the include() pattern has a trailing / .
      urls.W003: Your URL pattern

      has a name including a : . Remove the colon, to avoid ambiguous namespace references.
      urls.E004: Your URL pattern

      is invalid. Ensure that urlpatterns is a list of path() and/or re_path() instances.

    • urls.W005: URL namespace isn’t unique. You may not be able to reverse all URLs in this namespace.
    • urls.E006: The MEDIA_URL / STATIC_URL setting must end with a slash.
    • urls.E007: The custom handlerXXX view ‘path.to.view’ does not take the correct number of arguments (…).
    • urls.E008: The custom handlerXXX view ‘path.to.view’ could not be imported.
    • urls.E009: Your URL pattern

      has an invalid view, pass .as_view() instead of .

      contrib app checks¶

      admin ¶

      Admin checks are all performed as part of the admin tag.

      The following checks are performed on any ModelAdmin (or subclass) that is registered with the admin site:

      • admin.E001: The value of raw_id_fields must be a list or tuple.
      • admin.E002: The value of raw_id_fields[n] refers to name> , which is not a field of .
      • admin.E003: The value of raw_id_fields[n] must be a foreign key or a many-to-many field.
      • admin.E004: The value of fields must be a list or tuple.
      • admin.E005: Both fieldsets and fields are specified.
      • admin.E006: The value of fields contains duplicate field(s).
      • admin.E007: The value of fieldsets must be a list or tuple.
      • admin.E008: The value of fieldsets[n] must be a list or tuple.
      • admin.E009: The value of fieldsets[n] must be of length 2.
      • admin.E010: The value of fieldsets[n][1] must be a dictionary.
      • admin.E011: The value of fieldsets[n][1] must contain the key fields .
      • admin.E012: There are duplicate field(s) in fieldsets[n][1] .
      • admin.E013: fields[n]/fieldsets[n][m] cannot include the ManyToManyField name> , because that field manually specifies a relationship model.
      • admin.E014: The value of exclude must be a list or tuple.
      • admin.E015: The value of exclude contains duplicate field(s).
      • admin.E016: The value of form must inherit from BaseModelForm .
      • admin.E017: The value of filter_vertical must be a list or tuple.
      • admin.E018: The value of filter_horizontal must be a list or tuple.
      • admin.E019: The value of filter_vertical[n]/filter_horizontal[n] refers to name> , which is not a field of .
      • admin.E020: The value of filter_vertical[n]/filter_horizontal[n] must be a many-to-many field.
      • admin.E021: The value of radio_fields must be a dictionary.
      • admin.E022: The value of radio_fields refers to name> , which is not a field of .
      • admin.E023: The value of radio_fields refers to name> , which is not an instance of ForeignKey , and does not have a choices definition.
      • admin.E024: The value of radio_fields[ name>] must be either admin.HORIZONTAL or admin.VERTICAL .
      • admin.E025: The value of view_on_site must be either a callable or a boolean value.
      • admin.E026: The value of prepopulated_fields must be a dictionary.
      • admin.E027: The value of prepopulated_fields refers to name> , which is not a field of .
      • admin.E028: The value of prepopulated_fields refers to name> , which must not be a DateTimeField , a ForeignKey , a OneToOneField , or a ManyToManyField field.
      • admin.E029: The value of prepopulated_fields[ name>] must be a list or tuple.
      • admin.E030: The value of prepopulated_fields refers to name> , which is not a field of .
      • admin.E031: The value of ordering must be a list or tuple.
      • admin.E032: The value of ordering has the random ordering marker ? , but contains other fields as well.
      • admin.E033: The value of ordering refers to name> , which is not a field of .
      • admin.E034: The value of readonly_fields must be a list or tuple.
      • admin.E035: The value of readonly_fields[n] is not a callable, an attribute of class> , or an attribute of .
      • admin.E036: The value of autocomplete_fields must be a list or tuple.
      • admin.E037: The value of autocomplete_fields[n] refers to name> , which is not a field of .
      • admin.E038: The value of autocomplete_fields[n] must be a foreign key or a many-to-many field.
      • admin.E039: An admin for model has to be registered to be referenced by .autocomplete_fields .
      • admin.E040: must define search_fields , because it’s referenced by .autocomplete_fields .

      ModelAdmin ¶

      The following checks are performed on any ModelAdmin that is registered with the admin site:

      • admin.E101: The value of save_as must be a boolean.
      • admin.E102: The value of save_on_top must be a boolean.
      • admin.E103: The value of inlines must be a list or tuple.
      • admin.E104: class> must inherit from InlineModelAdmin .
      • admin.E105: class> must have a model attribute.
      • admin.E106: The value of class>.model must be a Model .
      • admin.E107: The value of list_display must be a list or tuple.
      • admin.E108: The value of list_display[n] refers to , which is not a callable, an attribute of class> , or an attribute or method on .
      • admin.E109: The value of list_display[n] must not be a ManyToManyField field.
      • admin.E110: The value of list_display_links must be a list, a tuple, or None .
      • admin.E111: The value of list_display_links[n] refers to , which is not defined in list_display .
      • admin.E112: The value of list_filter must be a list or tuple.
      • admin.E113: The value of list_filter[n] must inherit from ListFilter .
      • admin.E114: The value of list_filter[n] must not inherit from FieldListFilter .
      • admin.E115: The value of list_filter[n][1] must inherit from FieldListFilter .
      • admin.E116: The value of list_filter[n] refers to , which does not refer to a Field.
      • admin.E117: The value of list_select_related must be a boolean, tuple or list.
      • admin.E118: The value of list_per_page must be an integer.
      • admin.E119: The value of list_max_show_all must be an integer.
      • admin.E120: The value of list_editable must be a list or tuple.
      • admin.E121: The value of list_editable[n] refers to , which is not a field of .
      • admin.E122: The value of list_editable[n] refers to , which is not contained in list_display .
      • admin.E123: The value of list_editable[n] cannot be in both list_editable and list_display_links .
      • admin.E124: The value of list_editable[n] refers to the first field in list_display ( ), which cannot be used unless list_display_links is set.
      • admin.E125: The value of list_editable[n] refers to name> , which is not editable through the admin.
      • admin.E126: The value of search_fields must be a list or tuple.
      • admin.E127: The value of date_hierarchy refers to name> , which does not refer to a Field.
      • admin.E128: The value of date_hierarchy must be a DateField or DateTimeField .
      • admin.E129: must define a has_ _permission() method for the action.
      • admin.E130: __name__ attributes of actions defined in must be unique. Name is not unique.

      InlineModelAdmin ¶

      The following checks are performed on any InlineModelAdmin that is registered as an inline on a ModelAdmin .

      • admin.E201: Cannot exclude the field name> , because it is the foreign key to the parent model . .
      • admin.E202: has no ForeignKey to

      model> ./ has more than one ForeignKey to

      model> . You must specify a fk_name attribute.

    • admin.E203: The value of extra must be an integer.
    • admin.E204: The value of max_num must be an integer.
    • admin.E205: The value of min_num must be an integer.
    • admin.E206: The value of formset must inherit from BaseModelFormSet .
    • GenericInlineModelAdmin ¶

      The following checks are performed on any GenericInlineModelAdmin that is registered as an inline on a ModelAdmin .

      • admin.E301: ‘ct_field’ references , which is not a field on .
      • admin.E302: ‘ct_fk_field’ references , which is not a field on .
      • admin.E303: has no GenericForeignKey .
      • admin.E304: has no GenericForeignKey using content type field name> and object ID field name> .

      AdminSite ¶

      The following checks are performed on the default AdminSite :

      • admin.E401: django.contrib.contenttypes must be in INSTALLED_APPS in order to use the admin application.
      • admin.E402: django.contrib.auth.context_processors.auth must be enabled in DjangoTemplates ( TEMPLATES ) if using the default auth backend in order to use the admin application.
      • admin.E403: A django.template.backends.django.DjangoTemplates instance must be configured in TEMPLATES in order to use the admin application.
      • admin.E404: django.contrib.messages.context_processors.messages must be enabled in DjangoTemplates ( TEMPLATES ) in order to use the admin application.
      • admin.E405: django.contrib.auth must be in INSTALLED_APPS in order to use the admin application.
      • admin.E406: django.contrib.messages must be in INSTALLED_APPS in order to use the admin application.
      • admin.E408: django.contrib.auth.middleware.AuthenticationMiddleware must be in MIDDLEWARE in order to use the admin application.
      • admin.E409: django.contrib.messages.middleware.MessageMiddleware must be in MIDDLEWARE in order to use the admin application.
      • admin.E410: django.contrib.sessions.middleware.SessionMiddleware must be in MIDDLEWARE in order to use the admin application.
      • admin.W411: django.template.context_processors.request must be enabled in DjangoTemplates ( TEMPLATES ) in order to use the admin navigation sidebar.
      • auth.E001: REQUIRED_FIELDS must be a list or tuple.
      • auth.E002: The field named as the USERNAME_FIELD for a custom user model must not be included in REQUIRED_FIELDS .
      • auth.E003: must be unique because it is named as the USERNAME_FIELD .
      • auth.W004: is named as the USERNAME_FIELD , but it is not unique.
      • auth.E005: The permission codenamed clashes with a builtin permission for model .
      • auth.E006: The permission codenamed is duplicated for model .
      • auth.E007: The verbose_name of model must be at most 244 characters for its builtin permission names to be at most 255 characters.
      • auth.E008: The permission named of model is longer than 255 characters.
      • auth.C009: model>.is_anonymous must be an attribute or property rather than a method. Ignoring this is a security issue as anonymous users will be treated as authenticated!
      • auth.C010: model>.is_authenticated must be an attribute or property rather than a method. Ignoring this is a security issue as anonymous users will be treated as authenticated!
      • auth.E011: The name of model must be at most 93 characters for its builtin permission names to be at most 100 characters.
      • auth.E012: The permission codenamed of model is longer than 100 characters.

      contenttypes ¶

      The following checks are performed when a model contains a GenericForeignKey or GenericRelation :

      • contenttypes.E001: The GenericForeignKey object ID references the nonexistent field .
      • contenttypes.E002: The GenericForeignKey content type references the nonexistent field .
      • contenttypes.E003: is not a ForeignKey .
      • contenttypes.E004: is not a ForeignKey to contenttypes.ContentType .
      • contenttypes.E005: Model names must be at most 100 characters.

      postgres ¶

      The following checks are performed on django.contrib.postgres model fields:

      • postgres.E001: Base field for array has errors: …
      • postgres.E002: Base field for array cannot be a related field.
      • postgres.E003: default should be a callable instead of an instance so that it’s not shared between all field instances. This check was changed to fields.E010 in Django 3.1.

      sites ¶

      The following checks are performed on any model using a CurrentSiteManager :

      Источник

      Adblock
      detectorclashes with the table name of / . name> .

    Понравилась статья? Поделить с друзьями:
  • The form contains the following error fingerprint has already been taken
  • The form contains the following error fingerprint cannot be generated
  • The forever error sans
  • The forest ошибки новичков
  • The forest ошибка при запуске приложения 0xc000007b