В этой статье
- 4 ответы
- ADV
- Связанные вопросы
- Как удалить чужой репозиторий GitHub из списка?
- Почему возникает ошибка в Action?
- Почему не отображается сайт, сделанный на react js, на github pages?
- Почему GitHub не видит добавленные файлы в репозиторий?
- Есть ли разница как создавать ветку на основании feature или master?
- Минуточку внимания
- Share the Git Repository with a Group
- Как разделить файлы по веткам в новом проекте?
- Как вывести в файл список всех игнорируемых через правила файла .gitignore папок/файлов?
- How to fix the error remote Write access to repository not granted.?
- Сделал merge в локальный develop из branch-1, потом push на origin, а теперь получается что нужно откатить develop. Что делать?
- Как добавлять изменения в репозиторий git с разных компьютеров?
- Why “remote Write access to repository not granted.” Error is Seen?
- Настройка лучшего сценария eslint с git pre-commit?
4 ответы
9
Это на самом деле частный репозиторий? Если да, то я в это не верю
git clone git://github.com/mainDir/dirA
буду работать. Пытаться
git clone git@github.com:mainDir/dirA
от помощь github:
Для общедоступных репозиториев URL-адрес может быть URL-адресом только для чтения, например git://github.com/user/repo.git, или URL-адресом только для чтения HTTP, например http://github.com/user/repo.git. Для общедоступных репозиториев, которыми вы владеете или являетесь соавтором, а также для всех частных репозиториев, вы должны использовать частный URL-адрес ssh, например git@github.com:user/repo.git.
ответ дан 23 апр.
ngm
3
Просто попробуйте использовать:
git clone http://github.com/mainDir/dirA
or
git clone https://github.com/mainDir/dirA
ответ дан 24 апр.
Ana
0
Сегодня это случилось со мной сегодня, когда я удалил свой форк определенного репо, который был отсоединен от основной сети за день до этого. А потом я повторно разветвил апстрим под той же учетной записью.
Во-первых, он показывал мне
Forking org_name/repo_name
It should only take a few seconds.
дольше, чем обычно.
Затем он застрял с
This repository is temporarily unavailable.
The backend storage is temporarily offline. Usually this means the storage server is undergoing maintenance. Please contact support if the problem persists.
Check our status site for updates
на странице разветвленного репо.
Поэтому я удалил его через некоторое время, подождал несколько часов и снова разветвился.
Я думаю, что это какое-то состояние гонки, происходящее из-за возможной согласованности GitHub.
ответ дан 02 окт ’19, 22:10
webknjaz
Наверное да, но когда я его проверял, его там не было 🙂 – вебкнязь
-1
это другая проблема на самом деле:
git clone git://github.com/mainDir/dirA
больше похоже на попытку клонировать только подпапку mainDir репозиторий и GIT отказываются от этой функции по причине сохранения целостности репозитория. поэтому клонируйте вместо этого:
git clone git://github.com/mainDir
затем найдите нужную подпапку
ответ дан 19 апр.
Oleg Kokorin
Не тот ответ, который вы ищете? Просмотрите другие вопросы с метками
git
github
github-for-mac
or задайте свой вопрос.
ADV
Связанные вопросы
812
Git запрашивает имя пользователя каждый раз, когда я нажимаю
1431
Загрузите отдельную папку или каталог из репозитория GitHub
1460
Как мне правильно заставить Git push?
1435
Как я могу объединить несколько коммитов в другую ветку как одну сжатую фиксацию?
2539
Как отправить тег в удаленный репозиторий с помощью Git?
978
Ошибка Git push ‘[удаленное отклонение] мастер -> мастер (ветка в настоящее время проверена)’
4700
Как мне отправить новую локальную ветку в удаленный репозиторий Git и отследить ее тоже?
4382
Как изменить URI (URL) для удаленного репозитория Git?
2479
Как клонировать репозиторий Git в определенную папку?
4311
Как клонировать все удаленные ветки в Git?
Как удалить чужой репозиторий GitHub из списка?
- 1 подписчик
- 14 окт.
- 65 просмотров
ответов
0

GitHub
Простой
Почему возникает ошибка в Action?
- 1 подписчик
- 16 окт.
- 42 просмотра
ответов
0

Git
- +1 ещё
Простой
Почему не отображается сайт, сделанный на react js, на github pages?
- 1 подписчик
- 18 часов назад
- 75 просмотров
ответ
1

Git
Простой
Почему GitHub не видит добавленные файлы в репозиторий?
- 1 подписчик
- 14 окт.
- 74 просмотра
ответ
1

Node.js
- +3 ещё
Простой
Есть ли разница как создавать ветку на основании feature или master?
- 1 подписчик
- 13 окт.
- 66 просмотров
ответа
2
Вакансии с Хабр Карьеры
Frontend разработчик (автобизнес)
EXPOCAR
от 140 000 ₽
Технический писатель
Arenadata
от 150 000 до 200 000 ₽
ML инженер
Rebels.ai
от 120 000 до 170 000 ₽
Ещё вакансии
Заказы с Хабр Фриланса
Создать страницу «Работа администратора с предложениями экспертов»
21 окт. 2022, в 11:59
1000 руб./за проект
Реализовать бэк на Laravel
21 окт. 2022, в 11:53
100000 руб./за проект
В мобильной версии “Каталог” заменить на бургер с выпадающим списком
21 окт. 2022, в 11:48
300 руб./за проект
Ещё заказы
Минуточку внимания
Присоединяйтесь к сообществу, чтобы узнавать новое и делиться знаниями
Зарегистрироваться
Самое интересное за 24 часа
Почему из-за плагина w3tc не открывается страница?
- 2 подписчика
- 0 ответов
Smartctl ругается на нечитаемые сектора, но MegaCli делает вид, что всё в порядке, кому верить?
- 2 подписчика
- 0 ответов
Какая погрешность в количестве фиксаций целевых событий в Яндекс метрике допустима?
- 2 подписчика
- 0 ответов
Почему в Chrome не отображается круг, а получается квадрат?
- 2 подписчика
- 1 ответ
Как умножить матрицы с помощью SSE?
- 3 подписчика
- 0 ответов
Как сделать аутентификацию по номеру телефона?
- 4 подписчика
- 0 ответов
Как подождать асинхронного выполнения всех подписчиков события?
- 3 подписчика
- 0 ответов
Ломается весь код в Sublime Text?
- 3 подписчика
- 1 ответ
Периодически падает сайт с ошибкой 502 как найти проблему?
- 3 подписчика
- 2 ответа
Какой компилятор выбрать для C++?
- 2 подписчика
- 3 ответа
- © Habr
- О сервисе
- Обратная связь
- Блог
But, even after doing the above, the same problem might return again, and you may have to do the above chgrp and chmod whenever the problem occurs.
So, apart from fixing the permission error as explained above, we also need to fix the underlying problem.
In this case, the git repository (for example: myproj) is not setup as shared repository for groups. It might just be a bare repository.
If it is not setup as shared repository, you’ll see the above “insufficient permission on objects directory” issue starts to show-up again.
To verify whether your repository is already setup for group sharing, do the following git config -l option inside your git repository that has the problem.
$ cd /home/git/myproj
$ git config -l
user.name=John Smith
user.email=john@thegeekstuff.com
core.repositoryformatversion=0
core.filemode=true
core.bare=true
core.logallrefupdates=true
In the above output, we don’t see a parameter called “core.sharedrepository”. So, this particular repository (i.e myproj is not setup as shared repository).
The above command displays the configuration values from the “config” file that is located under your git repository.
$ cd /your/git/repo
$ cat config
[core]
repositoryformatversion = 0
filemode = true
bare = true
logallrefupdates = true
The above is setup as a bare repository. To convert a bare repository to shared repository, do the following:
git config core.sharedRepository group
Note: In the above command, don’t replace the keyword “group” with your groupname (for example: git). Use the above above command exactly as shown without changing anything. The “group” in the above command should be typed exactly as it is.
Now, if you view the git config as shown below, you’ll see the “core.sharedrepository” parameter set to group.
$ git config -l
user.name=John Smith
user.email=john@thegeekstuff.com
core.repositoryformatversion=0
core.filemode=true
core.bare=true
core.logallrefupdates=true
core.sharedrepository=group
The above will solve the insufficient permission issue permanently.
After you set the sharedrepository, if you view the config file under your git repository, you’ll notice that the value of sharedrepository parameter is set to 2 (which is group) as shown below.
$ cat config
[core]
repositoryformatversion = 0
filemode = true
bare = true
sharedrepository = 2
[receive]
denyNonFastforwards = true
Also, anytime you make a git repository as sharedrepository for group using the above command, it will also set the receive.denyNonFastforwards to true automatically as shown above.
Tweet
Add your comment
Как разделить файлы по веткам в новом проекте?
- 1 подписчик
- 18 окт.
- 88 просмотров
ответов
0

Git
Простой
Как вывести в файл список всех игнорируемых через правила файла .gitignore папок/файлов?
- 1 подписчик
- 17 окт.
- 43 просмотра
ответ
1

GitHub
Средний
How to fix the error remote Write access to repository not granted.?
To fix the error remote: Write access to repository not granted in Git, you have to recreate a PAT (Personal Access Token) with the scope as the “repo” ones.
If you are testing PAT in your repository then choose an expiration date as “never”, to be sure that you PAT will be valid through out the period you will be testing in you repository.
The scope attribute lists the user-granted scopes associated to the token. Typically, these scopes will be the same as what you asked. Users, on the other hand, may change their scopes, essentially allowing your application less access than you asked.
Additionally, when the OAuth procedure is complete, users may update token scopes. You should be aware of this possibility and modify the behavior of your application appropriately.
Scopes allow you to define precisely what kind of access you want. Scopes restrict OAuth token access. They do not provide any more permissions beyond those currently provided to the user.
Requested scopes are presented to the user on the permission form when creating an OAuth App on GitHub.
Below are the mentioned available OAuth repo scope in official Git documentation:
(no scope) | Grants read-only access to public information (including user profile info, repository info, and gists) |
repo | Grants full access to repositories, including private repositories. That includes read/write access to code, commit statuses, repository and organization projects, invitations, collaborators, adding team memberships, deployment statuses, and repository webhooks for repositories and organizations. Also grants ability to manage user projects. |
repo:status | Grants read/write access to commit statuses in public and private repositories. This scope is only necessary to grant other users or services access to private repository commit statuses without granting access to the code. |
repo_deployment | Grants access to deployment statuses for public and private repositories. This scope is only necessary to grant other users or services access to deployment statuses, without granting access to the code. |
public_repo | Limits access to public repositories. That includes read/write access to code, commit statuses, repository projects, collaborators, and deployment statuses for public repositories and organizations. Also required for starring public repositories. |
repo:invite | Grants accept/decline abilities for invitations to collaborate on a repository. This scope is only necessary to grant other users or services access to invites without granting access to the code. |
Scopes for OAuth Apps
It is critical to handle incorrect cases in which a user decides to provide you less access than you asked. For example, programs may warn or otherwise communicate with their users that their functionality will be reduced or that they will be unable to execute certain tasks.
Follow the steps mentioned below to fix the “remote: Write access to repository not granted.” in Git Error:
First you have to recreate a PAT, Personal Access Token, with, the scope as the repo ones. If you will be testing in your repository then chose an expiration date as “never”, to be sure that you PAT will be valid through out the period you will be testing in you repository.
The personal access token should start with ghp_…. The PAT then should authenticate you properly, also allowing you to clone the repository, and then push back to it.
Please make a note that a personal access token is similar to a password, but can easily be revoked/regenerated, so you should not use any other personal access tokens but the ones you own.
This should fix the error, “remote: Write access to repository not granted.” in Git.
Сделал merge в локальный develop из branch-1, потом push на origin, а теперь получается что нужно откатить develop. Что делать?
- 1 подписчик
- 14 окт.
- 50 просмотров
ответа
2

GitHub
Простой
Как добавлять изменения в репозиторий git с разных компьютеров?
- 1 подписчик
- 15 окт.
- 84 просмотра
ответа
2

Git
Простой
Why “remote Write access to repository not granted.” Error is Seen?
The error, “remote: Write access to repository not granted.” is seen because you are using someone else’s PAT, or personal access token in a repository which you do not own.
So it is a warning that you are not suppose to get the write access for someone else Git repository as you don’t have the authorized PAT access.
Furthermore, applications may always send users back through the procedure to get extra permission, but users can always say no.
The detailed solution to fix the error “remote: Write access to repository not granted.”, is given below:
Настройка лучшего сценария eslint с git pre-commit?
- 1 подписчик
- 13 окт.
- 54 просмотра
ответов
0

Git
Простой
- https://stackovergo.com/ru/q/2808868/git-clone—fatal-remote-error-access-denied-or-repository-not-exported
- https://qna.habr.com/q/738329
- https://www.thegeekstuff.com/2017/05/git-push-error/
- https://networkcult.com/fix-remote-write-access-to-repository-not-granted-4446/