Git push ошибка 403

I was able to clone a copy of this repo over HTTPS authenticated. I've made some commits and want to push back out to the GitHub server. Using Cygwin on Windows 7 x64. C:cygwinhomeXPheriorCode

I was able to clone a copy of this repo over HTTPS authenticated. I’ve made some commits and want to push back out to the GitHub server. Using Cygwin on Windows 7 x64.

C:cygwinhomeXPheriorCodelunch_call>git push
Password:
error: The requested URL returned error: 403 while accessing https://MichaelDrog
alis@github.com/derekerdmann/lunch_call.git/info/refs

fatal: HTTP request failed

Also set it up with verbose mode. I’m still pretty baffled.

C:cygwinhomeXPheriorCodelunch_call>set GIT_CURL_VERBOSE=1

C:cygwinhomeXPheriorCodelunch_call>git push
Password:
* Couldn't find host github.com in the _netrc file; using defaults
* About to connect() to github.com port 443 (#0)
*   Trying 207.97.227.239... * 0x23cb740 is at send pipe head!
* Connected to github.com (207.97.227.239) port 443 (#0)
* successfully set certificate verify locations:
*   CAfile: C:Program Files (x86)Git/bin/curl-ca-bundle.crt
  CApath: none
* SSL connection using AES256-SHA
* Server certificate:
*        subject: 2.5.4.15=Private Organization; 1.3.6.1.4.1.311.60.2.1.3=US; 1.
3.6.1.4.1.311.60.2.1.2=California; serialNumber=C3268102; C=US; ST=California; L
=San Francisco; O=GitHub, Inc.; CN=github.com
*        start date: 2011-05-27 00:00:00 GMT
*        expire date: 2013-07-29 12:00:00 GMT
*        subjectAltName: github.com matched
*        issuer: C=US; O=DigiCert Inc; OU=www.digicert.com; CN=DigiCert High Ass
urance EV CA-1
*        SSL certificate verify ok.
> GET /derekerdmann/lunch_call.git/info/refs?service=git-receive-pack HTTP/1.1
User-Agent: git/1.7.4.3282.g844cb
Host: github.com
Accept: */*
Pragma: no-cache

< HTTP/1.1 401 Authorization Required
< Server: nginx/1.0.4
< Date: Thu, 15 Sep 2011 22:44:41 GMT
< Content-Type: text/plain
< Connection: keep-alive
< Content-Length: 55
< WWW-Authenticate: Basic realm="GitHub"
<
* Ignoring the response-body
* Expire cleared
* Connection #0 to host github.com left intact
* Issue another request to this URL: 'https://MichaelDrogalis@github.com/dereker
dmann/lunch_call.git/info/refs?service=git-receive-pack'
* Couldn't find host github.com in the _netrc file; using defaults
* Re-using existing connection! (#0) with host github.com
* Connected to github.com (207.97.227.239) port 443 (#0)
* 0x23cb740 is at send pipe head!
* Server auth using Basic with user 'MichaelDrogalis'
> GET /derekerdmann/lunch_call.git/info/refs?service=git-receive-pack HTTP/1.1
Authorization: Basic XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
User-Agent: git/1.7.4.3282.g844cb
Host: github.com
Accept: */*
Pragma: no-cache

< HTTP/1.1 401 Authorization Required
< Server: nginx/1.0.4
< Date: Thu, 15 Sep 2011 22:44:41 GMT
< Content-Type: text/plain
< Connection: keep-alive
< Content-Length: 55
* Authentication problem. Ignoring this.
< WWW-Authenticate: Basic realm="GitHub"
* The requested URL returned error: 401
* Closing connection #0
* Couldn't find host github.com in the _netrc file; using defaults
* About to connect() to github.com port 443 (#0)
*   Trying 207.97.227.239... * 0x23cb740 is at send pipe head!
* Connected to github.com (207.97.227.239) port 443 (#0)
* successfully set certificate verify locations:
*   CAfile: C:Program Files (x86)Git/bin/curl-ca-bundle.crt
  CApath: none
* SSL re-using session ID
* SSL connection using AES256-SHA
* old SSL session ID is stale, removing
* Server certificate:
*        subject: 2.5.4.15=Private Organization; 1.3.6.1.4.1.311.60.2.1.3=US; 1.
3.6.1.4.1.311.60.2.1.2=California; serialNumber=C3268102; C=US; ST=California; L
=San Francisco; O=GitHub, Inc.; CN=github.com
*        start date: 2011-05-27 00:00:00 GMT
*        expire date: 2013-07-29 12:00:00 GMT
*        subjectAltName: github.com matched
*        issuer: C=US; O=DigiCert Inc; OU=www.digicert.com; CN=DigiCert High Ass
urance EV CA-1
*        SSL certificate verify ok.
* Server auth using Basic with user 'MichaelDrogalis'
> GET /derekerdmann/lunch_call.git/info/refs HTTP/1.1
Authorization: Basic xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
User-Agent: git/1.7.4.3282.g844cb
Host: github.com
Accept: */*
Pragma: no-cache

* The requested URL returned error: 403
* Expire cleared
* Closing connection #0
error: The requested URL returned error: 403 while accessing https://MichaelDrog
alis@github.com/derekerdmann/lunch_call.git/info/refs

fatal: HTTP request failed

These are the versions of git and curl that I have:

C:UsersXPherior>git --version
git version 1.7.4.msysgit.0

C:UsersXPherior>curl --version
curl 7.21.7 (amd64-pc-win32) libcurl/7.21.7 OpenSSL/0.9.8r zlib/1.2.5
Protocols: dict file ftp ftps gopher http https imap imaps ldap pop3 pop3s rtsp
smtp smtps telnet tftp
Features: AsynchDNS GSS-Negotiate Largefile NTLM SSL SSPI libz

asked Sep 15, 2011 at 22:45

Mike's user avatar

13

I just got the same problem and just figured out what’s cause.

Github seems only supports ssh way to read&write the repo, although https way also displayed ‘Read&Write’.

So you need to change your repo config on your PC to ssh way:

  1. Edit .git/config file under your repo directory.
  2. Find url=entry under section [remote "origin"].
  3. Change it from:
    url=https://MichaelDrogalis@github.com/derekerdmann/lunch_call.git
    to:
    url=ssh://git@github.com/derekerdmann/lunch_call.git
    That is, change all the texts before @ symbol to ssh://git
  4. Save config file and quit. now you could use git push origin master to sync your repo on GitHub.

zeFree's user avatar

zeFree

2,1002 gold badges31 silver badges38 bronze badges

answered Oct 14, 2011 at 18:26

Xiao's user avatar

XiaoXiao

11.9k2 gold badges28 silver badges36 bronze badges

17

To definitely be able to login using https protocol, you should first set your authentication credential to the git Remote URI:

git remote set-url origin https://yourusername@github.com/user/repo.git

Then you’ll be asked for a password when trying to git push.

In fact, this is on the http authentication format. You could set a password too:

https://youruser:password@github.com/user/repo.git

You should be aware that if you do this, your github password will be stored in plaintext in your .git directory, which is obviously undesirable.

answered Jul 6, 2012 at 19:41

Thiago Macedo's user avatar

Thiago MacedoThiago Macedo

6,1211 gold badge20 silver badges22 bronze badges

20

One small addition to Sean’s answer.

Instead of editing .git/config file manually, you can use git remote set-url command.

In your case it should be:

git remote set-url origin ssh://git@github.com/derekerdmann/lunch_call.git

I find it easier and cleaner, than messing around with dot-files.

  • help.github.com: Changing a remote’s URL

Community's user avatar

answered Jun 4, 2012 at 22:29

fetsh's user avatar

fetshfetsh

1,9091 gold badge16 silver badges17 bronze badges

1

Edit .git/config file under your repo directory

Find url= entry under section [remote "origin"]

Change it from url=https://github.com/rootux/my-repo.git to
https://USERNAME@github.com/rootux/my-repo.git

where USERNAME is your github user name

answered Nov 7, 2012 at 9:39

Gal Bracha's user avatar

Gal BrachaGal Bracha

18.1k11 gold badges71 silver badges85 bronze badges

3

The other answers that suggest switching to SSH sort of miss the point. HTTPS is supported, but you must log in with you GITHUB password, not your SSH passphrase (which was what was giving me the same exact error).

I was having the same problem, but making sure to use my actual GitHub password at the terminal password prompt fixed the solution with no alteration to the config, or resorting to SSH.

The reason it is important to note this, is many public institutions (such as my school) will block SSH, but allow HTTPS (which is the only reason I started cloning over HTTPS in the first place).

Hope that helps anyone else having the same issue…

answered Jan 17, 2012 at 17:27

BMB's user avatar

BMBBMB

1,58813 silver badges10 bronze badges

4

If you are using windows, sometimes this may happen because Windows stores credentials for outer repo (in our case github) in its own storage. And credentials that saved there can be different from those you need right now.

enter image description here

So to avoid this problem, just find github in this storage and delete saved credentials. After this, while pushing git will request your credentials and will allow you to push.

answered Apr 18, 2018 at 7:34

Andrew Gans's user avatar

Andrew GansAndrew Gans

6906 silver badges9 bronze badges

2

Same error and resolution on Mac OS X.

Everything was working fine till I created a new account on GitHub and tried to push

$ git push -u origin master

And got the error:

remote: Permission to NEWUSER/NEWREPO.git denied to OLDUSER. fatal: unable to access ‘https://github.com/NEWUSER/NEWREPO.git/’: The requested URL returned error: 403

It should have fixed by setting the user.name either for global or current repo

$ git config –-global user.name NEWUSER
$ git config user.name NEWUSER

But it didn’t.

I got it fixed by deleting the OLDUSER associated with GitHub from Keychain Access app under Passwords section. Then the push command went successful.

$ git push -u origin master

reference

Laurel's user avatar

Laurel

5,90314 gold badges30 silver badges56 bronze badges

answered Nov 10, 2014 at 11:36

zeeawan's user avatar

zeeawanzeeawan

6,5672 gold badges50 silver badges54 bronze badges

2

This works for me -:

git remote set-url origin https://username@github.com/user/repo.git

Hope it helps

Jeff Hammond's user avatar

Jeff Hammond

5,2153 gold badges27 silver badges45 bronze badges

answered Sep 27, 2015 at 21:41

stevensagaar's user avatar

2

I think @deepwaters got the answer correct for older versions. The HTTPS URL needs to have the username. I had git 1.7.0.4 and git push origin master wouldn’t even ask for a password till I added it.

answered Jun 27, 2012 at 14:44

nisah's user avatar

nisahnisah

2,4283 gold badges21 silver badges20 bronze badges

0

answered Jun 20, 2012 at 19:03

gsf's user avatar

gsfgsf

1,70816 silver badges11 bronze badges

1

A 403 code is «Forbidden». The server saw your request and refused it. Do you have permission to push to that repository?

answered Sep 16, 2011 at 0:32

Nick Veys's user avatar

Nick VeysNick Veys

23.1k4 gold badges43 silver badges63 bronze badges

3

A lot of answers here, but this is what solved my problem.

Since July 2020 you must use Token authentication to access GitHub if you are using HTTPS.

So you must generate an access token in your profile settings page and use it as your password. Check the boxes necessary to write to the repository.

Now add your username to the repo with this command:

git remote set-url origin https://yourusername@github.com/user/repo.git

When you try to push, it will ask for your password. Enter your newly generated token.

If you are still having trouble pushing, use the web interface to fork it as a personal repo to isolate any permission problem. You’ll be able to focus to solve the auth problem.

answered Jul 29, 2021 at 23:58

neves's user avatar

nevesneves

30.5k25 gold badges146 silver badges181 bronze badges

Figured it out. I cloned over HTTPS. Setting up my public SSH keys, cloning over SSH, and pushing over SSH fixed it.

answered Sep 16, 2011 at 3:29

Mike's user avatar

MikeMike

19k11 gold badges55 silver badges72 bronze badges

3

I faced the same error and the cause was stupid — I did not have privileges to commit to selected repository. I did not know that I have to

  1. fork selected project first
  2. clone repository locally
  3. commit my changes locally
  4. push changes to my github clone
  5. request pull request to upstream

as described in https://help.github.com/categories/63/articles

answered Mar 2, 2014 at 14:54

Leos Literak's user avatar

Leos LiterakLeos Literak

8,62319 gold badges80 silver badges150 bronze badges

2

I actually had a very simple fix to this. All i did was edit the git config file differently after cloning the repository. The remote origin url is what you need to edit in your default config file. It should look like seen below

[core]
    repositoryformatversion = 0
    filemode = true
    bare = false
    logallrefupdates = true
[remote "origin"]
    fetch = +refs/heads/*:refs/remotes/origin/*
    url = https://*username*@github.com/*username*/*repository*.git
[branch "master"]
    remote = origin
    merge = refs/heads/master

answered Oct 13, 2015 at 23:00

Akah's user avatar

AkahAkah

1,35913 silver badges19 bronze badges

3

Do this for a temporary fix

git push -u https://username:password@github.com/username/repo_name.git master

answered Sep 19, 2018 at 15:41

prashantitis's user avatar

prashantitisprashantitis

1,78723 silver badges50 bronze badges

0

  1. Click on your repository
  2. On the right hand side, click on «Settings»
  3. On the left hand side option panel, click on «Collaborators»
  4. Add the person name you know in GitHub
  5. Click «Add Collaborators»

After this our «Push to Git» worked fine.

Teepeemm's user avatar

Teepeemm

4,2815 gold badges34 silver badges57 bronze badges

answered Mar 13, 2015 at 13:38

Krishna's user avatar

KrishnaKrishna

911 silver badge1 bronze badge

0

change it from

url=https://MichaelDrogalis@github.com/derekerdmann/lunch_call.git 

to

url=ssh://git@github.com/derekerdmann/lunch_call.git

It works!

Do not forget the «git» before the «@».

Juan Sosa's user avatar

Juan Sosa

5,2521 gold badge34 silver badges41 bronze badges

answered Oct 18, 2012 at 1:07

JimmyDong's user avatar

JimmyDongJimmyDong

1531 silver badge7 bronze badges

1

answered Dec 6, 2012 at 18:37

SMSM's user avatar

SMSMSMSM

1,4793 gold badges19 silver badges34 bronze badges

0

For those having permission denied 403 error while using ssh(according to Xiao) or http urls
try these commands

>git config --global --unset-all credential.helper

>git config --unset-all credential.helper

with administrator rights

>git config --system --unset-all credential.helper

Community's user avatar

answered Jan 12, 2017 at 18:17

Moosa Baloch's user avatar

Moosa BalochMoosa Baloch

1,1651 gold badge13 silver badges25 bronze badges

1

None of the above answers worked for my enterprise GitHub account. Follow these steps for pushing via ssh key generation way.

Create a repo by visiting your git account.

Generate ssh key:

ssh-keygen -t rsa -C "your_email@example.com"

Copy the contents of the file ~/.ssh/id_rsa.pub to your SSH keys in your GitHub account settings.
Test SSH key:

ssh -T git@github.com
clone the repo:
git clone git://github.com/username/your-repository

Now cd to your git clone folder and do:

git remote set-url origin git@github.com:username/your-repository.git

Now try editing a file (try the README) and then do:

git add -A
git commit -am "my update msg"
git push -u origin master

Update: new git version seems to recommend not to have any file while new repo is created. Hence make aa blank repo.

answered Feb 13, 2018 at 7:02

CKM's user avatar

CKMCKM

1,8932 gold badges23 silver badges29 bronze badges

1

Below is the solution

For Windows you can find the keys here:

control panel > user accounts > credential manager > Windows credentials > Generic credentials

Next, remove the Github keys.

In mac

1-In Finder, search for the Keychain Access app.

2In Keychain Access, search for github.com.

3-Find the «internet password» entry for github.com.

4-Edit or delete the entry accordingly.

answered Apr 13, 2020 at 9:27

Kapil Soni's user avatar

Kapil SoniKapil Soni

9932 gold badges13 silver badges36 bronze badges

0

What worked for me:

My repo was a fork and still linked to the the parents repo.

git remote -v

Will tell you if it is your repo or not.

git remote set-url origin https://github.com/USERNAME/OTHERREPOSITORY.git

Allows you to reconfigure it to your repo and then allow you to push.

Andrew Lygin's user avatar

Andrew Lygin

5,9671 gold badge32 silver badges37 bronze badges

answered Aug 26, 2016 at 17:13

timxor's user avatar

timxortimxor

95211 silver badges15 bronze badges

0

if you get 403 error with github,

sure to check all checkboxs when create token:

https://github.com/settings/tokens

i think github token generate page has design flaw.

answered Mar 1, 2022 at 3:18

sailfish009's user avatar

sailfish009sailfish009

2,4161 gold badge24 silver badges30 bronze badges

For anyone curious, my mac machine vs lucid vm ran git 1.7.6 vs 1.7.0.4, and the exact same repo was pushable from my mac (newer git) but not the VM

Same curl version. Perhaps some older git versions don’t support https pushes?

answered Mar 5, 2012 at 23:49

patcon's user avatar

patconpatcon

1,6771 gold badge12 silver badges9 bronze badges

2

Add the user name as part of the URL and This error happens because the git command is hitting http instead of https. So set the url

git remote set-url origin https://<username>@github.com/Path_to_repo.git

After which you will be prompted for password:

Tunaki's user avatar

Tunaki

130k46 gold badges326 silver badges414 bronze badges

answered Mar 5, 2016 at 15:01

venkat sam's user avatar

venkat samvenkat sam

1581 silver badge12 bronze badges

Try below command using administrator permission. This command solved my issue. Hope it will resolve your problem.

git config --system --unset-all credential.helper

answered Apr 25, 2020 at 18:03

Faisal's user avatar

FaisalFaisal

4,4913 gold badges40 silver badges49 bronze badges

1

I figured out my own variation of this problem.

The issue was not changing the protocol from https to ssl, but instead,
setting the Github global username and email! (I was trying to push to a
private repository.

git config --global user.email "your_github_email_@email.com"

git config --global user.name "Your full name"

answered Feb 17, 2014 at 21:08

Lucas Ou-Yang's user avatar

Lucas Ou-YangLucas Ou-Yang

5,35513 gold badges42 silver badges61 bronze badges

1

Github has page dedicated to troubleshooting this error:

https://help.github.com/articles/https-cloning-errors

In my case it turned out that using a new version of git (1.8.5.2) solved this problem.

answered Sep 27, 2014 at 13:23

AndyL's user avatar

AndyLAndyL

14.1k14 gold badges43 silver badges70 bronze badges

Anyone who didn’t solve their problem with these solutions follow this thread:

«This happens when two git accounts are being used on same machine»
https://stackoverflow.com/a/52046047/7861886

it has Windows solution and also i have added Mac solution for Mac users in comments.

answered Jul 16, 2020 at 20:58

Mehrdad's user avatar

MehrdadMehrdad

9311 gold badge14 silver badges24 bronze badges

Решение ошибки remote: Permission to user/repo denied to user/other-repo. fatal: unable to access user/repo: The requested URL returned error: 403

Дата: 27.03.2017

В данном уроке рассмотрим варианты решения данной оишбки:

remote: Permission to user/repo denied to user/other-repo.
fatal: unable to access user/repo: The requested URL returned error: 403

Возникает она чаще всего у новичков при попытке выполнить команду:

$ git push

Пример ошибки на скриншоте ниже.

git-permission-to-denied-to-error-403.jpg

Данная ошибка возникает довольно часто при работе с Git в терминале Windows. Суть ошибка довольно таки простая, но почему-то в интернете постоянно создаются темы с вопросом на данную тему и нет внятного ответа на русском языке.

Ошибка говорит нам о том, что мы пытаемся отправить данные в чужой репозиторий. И о том, что текущий пользователь Git не имеет прав для отправки данных в указанный в команде репозиторий.

Существует два способа решить данную ошибку:


Вариант 1. Дать текущему пользователю права для работы с репозиторием

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

github-repo-config.jpg

После этого вы сможете работать с репозиторием как со своим и ошибка больше не появится.


Вариант 2. Назначить в системе текущим пользователем Git ту учетную запись, в которую не можете отправить данные

Для этого необходимо перейти в Панель управления Windows. Выбрать отображение в виде категорий.

win-panel.jpg

Перейти в раздел “Учетные записи пользователей и семейная безопасность”. Далее в раздел “Диспетчер учетных данных”. В самом низу будет блок “Общие учетные данные”. Нажмите в нем ссылку “Удаление из хранилища”.

delete-git-config.jpg

После этого при попытке выполнить команду:

$ git push -u origin master

Терминал запросит у вас пароль от учетной записи на Github в чей репозиторий вы пытаетесь отправить данные.

После ввода пароля система установит данного пользователя как основного и будет использовать его в дальнейшем при работе с Git.


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

git

github


Не забудьте сказать спасибо. Поставьте лайк!

Здравствуйте.

1) Вы пытаетесь загрузить с другого аккаунта, выйти из него я не знаю как, но зато, при установке git на ваш компьютер, создаётся файл .githistory, обычно пихается в пользовательскую папку, как и данные по composer. (for Windows) — для других систем не узнавал.
2) Если вы нашли .githistory — и используете другой аккаунт, удалите его. Возможно другие файлы со словом git так же стоит удалить.
3) Убедитесь, что вы после удаления истории сделали новую регистрацию:

$ git config --global user.name 'login'
$ git config --global user.email 'mail@yourmail.ru'

4) Когда создаёте репозиторий на GitHub , клонируйте его на свой компьютер.
Чтобы убедится, что вы открыли консоль [Git Bash] в нужном месте, просто сделайте команду
$ git status
Если репозиторий и директория верны, он красным подсветит файлы, которые нужно добавить.
Если он пишет, что такой директории не существует, значит перейдите в вашу папку.
$ cd your_folder — ещё раз проверьте статус.
Если git увидел ваш склонированный репозиторий, значит делайте запрос:
$ git add .
или
$ git add --all
Почему я не начал с
$ git init ?
Если вы склонировали, то папка .git там уже есть.
Закидывайте к этой папке и файлу README.md ваши файлы, и делайте
$ git add .
Только теперь можно делать коммиты
$ git commit -m "your commit"
высветились все файлы? Тогда пропускаете
$ git remote add origin.... — потому что ветка уже создана, при создании репозитория на сайте.
Теперь мы загружаем:
$ git push -u origin master
Если не ошибаюсь, дописать записанное можно через команду:
$ git pull

—-
Самое главное, это сменить пользователя на того, у которого есть права, иначе вам не поможет удаление программы и установка новой. Есть команда, которая чистит кеш истории
$ git credential-cache exit
Но она почему-то в последнее время бесполезная и нерабочая, так что ищите способ очистить кеш.
Что касается ключей и ssh — их можно и не создавать, но как показывает практика, не только git , но и composer не дадут вам работать.

Успехов вам, надеюсь помог.

P.S. данный метод мне помог, если вы видите содержимое файла README.md смотрите в settings что у вас за ошибка, устраните её, и обновите браузер. Возможно, ещё придётся выбрать тему, или указать описание, так же смотрите, где у вас галочки стоят, они тоже могут вызвать головную боль.

Содержание

  1. ‘403 Forbidden’ error message when you try to push to a GitHub repository
  2. Problem
  3. Cause
  4. Resolution
  5. error: The requested URL returned error: 403 Forbidden while accessing Github repo
  6. Решение ошибки remote: Permission to user/repo denied to user/other-repo. fatal: unable to access user/repo: The requested URL returned error: 403
  7. Существует два способа решить данную ошибку:
  8. jhjguxin / nginx-403-forbidden-error-hosting-in-user-home-directory.md
  9. GIT ERROR 403 как исправить? — Хабр Q&A
  10. Git The requested URL returned error: 403
  11. 403 Forbidden” Ошибка обновления yum – IT is good
  12. Проблема
  13. Решение
  14. Диагностика
  15. Permission to user/repo denied to user/other-repo
  16. Существует два способа решить данную ошибку:
  17. Сообщение об ошибке 403 Forbidden при отправке в репозиторий GitHub
  18. Удаленный: доступ к UserName / repo.git запрещен для OtherUserName фатальный: невозможно получить доступ к https://github.com/UserName/repo.git / ‘: Запрошенный URL вернул ошибку: 403 | vGeek
  19. [Решенный — 100% рабочий код] — отправка в Git возвращает код ошибки 403 фатальный: HTTP-запрос не выполнен — ​​git
  20. Git Запрошенный URL-адрес вернул ошибку: 403
  21. Как устранить ошибку, возвращенную запрашиваемым URL: 403 в репозитории git
  22. Как устранить ошибку, возвращенную запрашиваемым URL: 403 в репозитории git
  23. //git-codecommit.ca-central-1.amazonaws.com Запрошенный URL вернул ошибку: 403
  24. Шаг 1. Начальная настройка CodeCommit
  25. Шаг 2. Установите Git
  26. Шаг 3. Настройте открытый и закрытый ключи для Git и CodeCommit
  27. Шаг 4. Подключитесь к консоли CodeCommit и клонируйте репозиторий

‘403 Forbidden’ error message when you try to push to a GitHub repository

This article discusses a problem that may occur when you try to push to a remote GitHub repository using HTTPS from an A2 Hosting server.

Problem

When you try to push changes to a GitHub repository from an A2 Hosting server using an HTTPS URL, you receive the following error message:

Cause

There are a few possible causes for this problem:

  • You typed an incorrect password. Make sure you are using the correct GitHub password for the account.
  • The Git client on the A2 Hosting server requires a modified HTTPS URL to work correctly. If this is the cause, the password prompt does not even appear when you try to do a push operation.

Resolution

If you are sure you are using the correct GitHub password, there are two ways to resolve the “403 Forbidden” problem:

Method #1: Use SSH

Instead of using HTTPS URLs to push changes to GitHub, you can use SSH instead. For information about how to do this, please visit https://help.github.com/articles/changing-a-remote-s-url.

Method #2: Modify the HTTPS URL

Some A2 Hosting managed servers have an old version of the Git client installed. To push changes to GitHub using this older client version, you must include your GitHub username in the HTTPS URL.

To do this, follow these steps:

  1. Log in to your A2 Hosting account using SSH.
  2. At the command prompt, change to the directory where the Git repository is located.
  3. Type the following command:

You should see output that resembles the following:

You need to add your GitHub username to the github.com portion of the URL. To do this, type the following command, replacing the values in red with your own account information:

To verify the new remote URL setting, type the following command:

Now when you try to push changes to the GitHub repository, you are prompted for a password, and the push operation should succeed.

Источник

error: The requested URL returned error: 403 Forbidden while accessing Github repo

After a long time I created a repo on my Github account.Creating a repo is quite easy on Github, simply login to your account and click on ‘create repo’ button. After creating git repo, now it was time to push all my codes from my desktop to github repo.

After cloning the repo into my system, I copied all my coded into git cloned directory. And tried to push my code into gtihub repo. But got the error message “error: The requested URL returned error: 403 Forbidden while accessing https://github.com/sharadchhetri/skctheme.git/info/refs

The error was quite clear that the problem was with URL. I again used my old generic steps for git. Finally it is solved and all codes are successfully pushed into github repo.

In below section, I am writing step by step how I pushed the code in Github repo successfully
Follow the given below steps from where(Desktop/Server) you want to push the code into Github repo :

Step 1: Clone the github repo into your system. (You should first create a repo in Github)

Get repo url at right hand sidebar of your repo page. Replace your github repo’s HTTPS url with https://github.com/USER-NAME/REPO-NAME.git

After cloning will be finished, you will find the directory name matching with the name of Github repo name you just cloned.

Step 2 : Copy your code or files to REPO-NAME directory

For example, I have saved my codes in my desktop at /home/sharad/MyCode directory. Here, I am copying all codes and child directories into REPO-NAME directory .

Step 3 : Change to git cloned directory i.e REPO-NAME.

Step 4 : Set Github account username and email id for authentication

Step 5: Set Github URL. (This section is actually solution of this problem)

Step 6: Now add all files and directory by using below given command inside REPO-NAME directory
(There is a dot in command, can you see that!)

Step 7: Now write comment on commit

Step 8: Now push the code in Github repo.
Be ready with your github account password because it will ask.

Источник

Решение ошибки remote: Permission to user/repo denied to user/other-repo. fatal: unable to access user/repo: The requested URL returned error: 403

В данном уроке рассмотрим варианты решения данной оишбки:

remote: Permission to user/repo denied to user/other-repo. fatal: unable to access user/repo: The requested URL returned error: 403

Возникает она чаще всего у новичков при попытке выполнить команду:

Пример ошибки на скриншоте ниже.

Данная ошибка возникает довольно часто при работе с Git в терминале Windows. Суть ошибка довольно таки простая, но почему-то в интернете постоянно создаются темы с вопросом на данную тему и нет внятного ответа на русском языке.

Ошибка говорит нам о том, что мы пытаемся отправить данные в чужой репозиторий. И о том, что текущий пользователь Git не имеет прав для отправки данных в указанный в команде репозиторий.

Существует два способа решить данную ошибку:

Вариант 1. Дать текущему пользователю права для работы с репозиторием

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

После этого вы сможете работать с репозиторием как со своим и ошибка больше не появится.

Вариант 2. Назначить в системе текущим пользователем Git ту учетную запись, в которую не можете отправить данные

Для этого необходимо перейти в Панель управления Windows. Выбрать отображение в виде категорий.

Перейти в раздел “Учетные записи пользователей и семейная безопасность”. Далее в раздел “Диспетчер учетных данных”. В самом низу будет блок “Общие учетные данные”. Нажмите в нем ссылку “Удаление из хранилища”.

После этого при попытке выполнить команду:

$ git push -u origin master

Терминал запросит у вас пароль от учетной записи на Github в чей репозиторий вы пытаетесь отправить данные.

После ввода пароля система установит данного пользователя как основного и будет использовать его в дальнейшем при работе с Git.

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

Источник

jhjguxin / nginx-403-forbidden-error-hosting-in-user-home-directory.md

nginx 403 Forbidden Error hosting in User Home Directory

how I config the application

My first suspicion was that this was a permissisons problem. However, when I run ls -lha public/aboutuscn.html I see

which looks right to me? Even running chmod 777 /home/gxdevelop/dev/ampedservice/public/aboutuscn.html so that the permissions are

does not help. /etc/init.d/nginx configtest does not produce any errors either and I’m sure the symlink in /etc/

So I’ve been at this for a few hours and I’m now wondering what is so special about my user directory that I cannot serve anything inside of it? Ubuntu encrypts home directories these days? Could that be the problem? I also have this issue on an EC2 Ubuntu 12.04 instance (don’t know if user directories are encrypted there)

Default User Home Directory Permissions

So it seems that the default permissions on user home directories in Ubuntu 12.04 is 700 .** Nginx needs to have read permission the files that should be served AND have execute permission in each of the parent directories along the path from the root to the served files.**

You can give your user directory these permissions by running

You may also use 755 , which is the default permission setting on the home directory on many systems.

The directories/files in your web root can belong to the www-data user or your regular personal user as long as the user/group that nginx runs as (as defined in nginx.conf) has READ permission on all files to be served and execute permission on all web root directories.

I just set all directories in my web root to be owned by my user account and have permissions 755 and I set all files to be served from the web root to have permissions 664 since these were the defaults on my machine.

Note on Converting Permission numbers to String Rep.

Ignore the first character ( d for directory, — for file, etc). The remaining 9 characters form a binary triplet where any non-dash character is a 1 and a dash is a 0.

I needed a refresher on this when I was dealing with permissions.

Источник

GIT ERROR 403 как исправить? — Хабр Q&A

—-
Самое главное, это сменить пользователя на того, у которого есть права, иначе вам не поможет удаление программы и установка новой. Есть команда, которая чистит кеш истории
$ git credential-cache exit
Но она почему-то в последнее время бесполезная и нерабочая, так что ищите способ очистить кеш.
Что касается ключей и ssh — их можно и не создавать, но как показывает практика, не только git , но и composer не дадут вам работать.

Успехов вам, надеюсь помог.

P.S. данный метод мне помог, если вы видите содержимое файла README.md смотрите в settings что у вас за ошибка, устраните её, и обновите браузер. Возможно, ещё придётся выбрать тему, или указать описание, так же смотрите, где у вас галочки стоят, они тоже могут вызвать головную боль.

Git The requested URL returned error: 403

1. Описание проблемы

git В pull/push Подскажите когда код: The Requested URL return error 403 , Что означает, что у нас нет разрешения приехать pull/push Связанный код

Во-вторых, анализ проблемы
  • Вполне возможно, что у вас действительно нет разрешения (серьезное лицо)
  • Вы изменили git Имя пользователя и пароль хранилища, поэтому пароли учетных записей, кэшированные в вашей памяти и на жестком диске, не могут быть использованы
1. Реализация

Красная часть картины [user] Для тебя git Информация о конфигурации аккаунта, [credential] Где хранить эту информацию для вас

2. Реализация
2. Реализация

git help -a | grep credential Команда для просмотра поддержки вашей системы crendential , cache Представляет кеш в памяти, store От имени диска.

git config credential.helper Команду можно увидеть cache 、 store 、 osxkeychain (брелок) Есть еще git Информация о конфигурации. Из рисунка мы можем нарисовать git config Также хранится в store в

3. Общий метод настройки:
  • git config —global (—replace-all) user.name «Ваше имя пользователя»
  • git config —global (—replace-all) user.email «Ваш почтовый ящик»
4. Если описанные выше шаги не имеют никакого эффекта, нам нужно очистить кеш (.gitconfig)
  • git config —local —unset credential.helper
  • git config —global —unset credential.helper
  • git config —system —unset credential.helper

Конкретное введение можно посмотретьВот, Может быть много мест .gitconfig файл

В-четвертых, несколько раз введите имя пользователя и пароль
После очистки кэша нам нужно вводить имя пользователя и пароль каждый раз, когда мы отправляем код
  • git config —global credential.helper store

Выполнить модификацию . gitconfig Файл конфигурации, положить следующий контент в конец

выполненный vim .gitconfig Посмотреть

Этот вопрос окончен, пожалуйста, оставьте сообщение, если у вас есть какие-либо вопросы

связи

403 Forbidden” Ошибка обновления yum – IT is good

Проблема

Сервер CentOS / RHEL / OEL 6, настроенный на использование локального сервера yum для обновлений, получает следующие ошибки во время обновления yum.

Решение

Проверка внутри структуры каталогов сервера yum сообщает о недопустимых разрешениях для нескольких пакетов.

Другой пользователь не имеет прав на чтение.

Предоставьте разрешение на чтение другим пользователям внутри последнего каталога CentOS / RHEL / OL 6 на локальном сервере yum.

Диагностика

wget с режимом отладки покажет разрешение или другие проблемы с доступом.

Permission to user/repo denied to user/other-repo

В данном уроке рассмотрим варианты решения данной оишбки:

remote: Permission to user/repo denied to user/other-repo. fatal: unable to access user/repo: The requested URL returned error: 403

Возникает она чаще всего у новичков при попытке выполнить команду:

Пример ошибки на скриншоте ниже.

Данная ошибка возникает довольно часто при работе с Git в терминале Windows. Суть ошибка довольно таки простая, но почему-то в интернете постоянно создаются темы с вопросом на данную тему и нет внятного ответа на русском языке.

Ошибка говорит нам о том, что мы пытаемся отправить данные в чужой репозиторий. И о том, что текущий пользователь Git не имеет прав для отправки данных в указанный в команде репозиторий.

Существует два способа решить данную ошибку:

Вариант 1. Дать текущему пользователю права для работы с репозиторием

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

После этого вы сможете работать с репозиторием как со своим и ошибка больше не появится.

Вариант 2. Назначить в системе текущим пользователем Git ту учетную запись, в которую не можете отправить данные

Для этого необходимо перейти в Панель управления Windows. Выбрать отображение в виде категорий.

Перейти в раздел “Учетные записи пользователей и семейная безопасность”. Далее в раздел “Диспетчер учетных данных”. В самом низу будет блок “Общие учетные данные”. Нажмите в нем ссылку “Удаление из хранилища”.

После этого при попытке выполнить команду:

$ git push -u origin master

Терминал запросит у вас пароль от учетной записи на Github в чей репозиторий вы пытаетесь отправить данные.

После ввода пароля система установит данного пользователя как основного и будет использовать его в дальнейшем при работе с Git.

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

Не забудьте сказать спасибо. Поставьте лайк!

Сообщение об ошибке 403 Forbidden при отправке в репозиторий GitHub

В этой статье обсуждается проблема, которая может возникнуть при попытке выполнить отправку в удаленный репозиторий GitHub с помощью HTTPS с сервера хостинга A2.

Задача

При попытке отправить изменения в репозиторий GitHub с сервера хостинга A2 с помощью URL-адреса HTTPS появляется следующее сообщение об ошибке:

Причина

Есть несколько возможных причин этой проблемы:

  • Вы ввели неверный пароль. Убедитесь, что вы используете правильный пароль GitHub для учетной записи.
  • Для правильной работы клиенту Git на сервере A2 Hosting требуется измененный URL-адрес HTTPS. Если это причина, запрос пароля не появляется даже при попытке выполнить операцию push.
Разрешение

Если вы уверены, что используете правильный пароль GitHub, есть два способа решить проблему «403 Forbidden»:

Метод №1: используйте SSH

Вместо использования URL-адресов HTTPS для отправки изменений в GitHub вы можете использовать SSH.Для получения информации о том, как это сделать, посетите https://help.github.com/articles/changing-a-remote-s-url.

Метод № 2: изменение URL-адреса HTTPS

На некоторых управляемых серверах A2 Hosting установлена ​​старая версия клиента Git. Чтобы отправить изменения в GitHub с помощью этой старой версии клиента, вы должны включить свое имя пользователя GitHub в URL-адрес HTTPS.

Для этого выполните следующие действия:

  1. Войдите в свою учетную запись хостинга A2, используя SSH.
  2. В командной строке перейдите в каталог, в котором находится репозиторий Git.
  3. Введите следующую команду:

Вы должны увидеть результат, подобный следующему:

Вам необходимо добавить свое имя пользователя GitHub в часть github.com URL-адрес. Для этого введите следующую команду, заменив значения, выделенные красным, на информацию о вашей учетной записи:

Чтобы проверить новую настройку удаленного URL-адреса, введите следующую команду:

Теперь, когда вы пытаетесь отправить изменения в репозиторий GitHub, вам будет предложено ввести пароль, и операция push должна завершиться успешно.

Удаленный: доступ к UserName / repo.git запрещен для OtherUserName фатальный: невозможно получить доступ к https://github.com/UserName/repo.git / ‘: Запрошенный URL вернул ошибку: 403 | vGeek

Я работал над одним из клиентских проектов, размещенных на github.com, я клонировал репо локально, добавил несколько файлов в локальное репо, и локально поставил / зафиксировал проект, все было хорошо.

Но когда попытался протолкнуть изменения в удаленное репо на github.com. Я получал ошибку ниже.

Эта ошибка говорит о том, что вы используете неправильные учетные данные или неправильное репо: дело в том, что когда вы нажимаете его, не запрашивая учетные данные, ниже приведены возможные причины.

  1. Имя пользователя должно быть пользователем, а не адресом электронной почты.
  2. Убедитесь, что вы ввели правильный пароль. Если у вас включена двухфакторная аутентификация на GitHub, вам необходимо убедиться, что вы создали токен доступа с соответствующими разрешениями на доступ и вместо этого используете токен в качестве пароля.
  3. Формат репо: https://github.com/ / .git
  4. У вас есть 2 разных аккаунта github (контроль версий)

403 означает, что GitHub не предоставляет вам доступ, поэтому одна или несколько из 4 вышеуказанных причин являются проблемой. В моем случае эта проблема возникла из-за того, что у меня есть одна личная учетная запись github, а вторая — от клиента. До сих пор я использовал свою учетную запись github, а в прошлом, когда я впервые нажимал, он запрашивал мои учетные данные github, которые были сохранены / кэшированы в диспетчере учетных данных Windows, и сегодня впервые, когда я использую вторую учетную запись, она использует имя пользователя и пароль, кэшированные ранее для предыдущей учетной записи github, вызывали ошибку отказа в доступе.

Эту проблему можно решить несколькими способами. Но ниже простой метод поможет вам решить проблему.

шаг 1: Перейдите в Панель управления.
Шаг 2: В панели управления найдите и перейдите к учетным записям пользователей
Шаг 3: После этого перейдите к диспетчеру учетных данных
Шаг 4: Затем учетные данные Windows
Шаг 5: перейдите в Общие учетные данные и выполните поиск на github.com, разверните его
Шаг 6: Наконец, удалите ключи Github.

После удаления кэшированных учетных данных попробуйте запустить проект на удаленном компьютере, выполнив команду git push origin master , это вызовет приглашение для входа в GitHub, после успешной аутентификации с правильным именем пользователя и паролем команда будет выполнена успешно, и файлы / папки будут отправлены успешно на удаленном репозитории github.

Если вы не хотите удалять учетные данные предыдущих пользователей из диспетчера учетных данных Windows, другой способ решить эту проблему — предоставить предыдущему пользователю доступ через новое репозиторий github. com.

Полезная статья
Решенный код Visual Studio Убедитесь, что вы настроили свои user.name и user.email в git
Часть 1 Интеграция управления версиями Git в Visual Studio Код
Часть 2 Интеграция управления исходным кодом основной ветки Git в Visual Studio Код
Часть 3 Интеграция контроля версий Git clone в Visual Studio Code

[Решенный — 100% рабочий код] — отправка в Git возвращает код ошибки 403 фатальный: HTTP-запрос не выполнен — ​​git

  • Мы можем клонировать копию этого репо через HTTPS-аутентификацию.
  • Мы сделали несколько коммитов и хотим вернуться на сервер GitHub. Использование Cygwin в Windows 7 x64.

Копировать код

Github дает идею, что он поддерживает ssh-способ чтения и записи репо, тогда как https-способ также отображает «Чтение и запись».

  • Теперь вам нужно изменить конфигурацию репо на вашем ПК на ssh:

1. Отредактируйте файл .git / config в каталоге репо
2. Найдите запись url ​​= в разделе [удаленный «origin»]
3. Измените его с url ​​= https: // [электронная почта защищена] /derekerdmann/lunch_call.git на url ​​= ssh: // [электронная почта защищена] /derekerdmann/lunch_call.git. т.е. изменить все тексты перед символом @ на ssh: // git
4.Сохраните файл конфигурации и выйдите. Вы можете использовать git push origin master для синхронизации вашего репо на GitHub

  • Чтобы войти в систему с использованием протокола https, , вы должны сначала установить свои учетные данные для аутентификации на git Remote URI:
  • Теперь вам будет предложено ввести пароль при попытке git push.
  • Фактически это формат аутентификации http.Теперь вам нужно установить пароль:
  • Вы должны знать, что ваш пароль github будет храниться в виде открытого текста в вашем каталоге .git, что нежелательно.
  • Для редактирования файла .git / config вручную вы можете использовать команду git remote set-url .
  • В вашем случае это должно быть:
  • Редактировать .git / config в каталоге репо
  • Найдите запись url ​​= в разделе [удаленное «происхождение»]
  • Измените его с url ​​= https: //github.com/rootux/ms-Dropdown.git С по https: // [email protected] /rootux/ms-Dropdown.git
  • Где USERNAME — ваше имя пользователя github
  • При отказе в разрешении ошибка 403 при использовании ssh (согласно Сяо) или http-адреса, вы также можете попробовать эти команды

Копировать код

С правами администратора

Git Запрошенный URL-адрес вернул ошибку: 403

Во-первых, описание проблемы

git В pull / push При запросе кода: Запрошенная ошибка возврата URL-адреса 403 , что означает, что у нас нет разрешения на pull / push Связанный код

Во-вторых, анализ проблемы
  • Возможно, вы действительно без разрешения (серьезное лицо)
  • Вы изменили git Невозможно использовать имя пользователя и пароль репозитория, пароль учетной записи, кэшированной в вашей памяти и на жестком диске.
В-третьих, проблема решена

Красная часть изображения [пользователь] Для вашего git Информация о конфигурации учетной записи, [учетные данные] Сохраните ваше местоположение для этой информации

2, реализация
2, реализация

git help -a | grep credential Команда для просмотра поддержки вашей системы crendential , cache Представляет кэш в памяти, store Представляет диск.
git config credential.helper Команда может видеть кеш 、 store 、 Osxkeychain (keychain) Есть еще git Информация о конфигурации. Из рисунка мы можем нарисовать git config Также хранится в store в

3, общий метод конфигурации:
  • Git config —global (—replace-all) user.name «ваше имя пользователя»
  • Git config —global (—replace-all) user.email «ваш почтовый ящик»
4, если вышеуказанные шаги не дали результата, нам нужно очистить кеш (.gitconfig)
  • git config —local —unset credential.helper
  • git config —global —unset credential.помощник
  • git config —system —unset credential.helper

Конкретное введение можно посмотреть Здесь может быть несколько мест .gitconfig файл

В-четвертых, несколько раз введите логин и пароль
После очистки кеша нам нужно вводить имя пользователя и пароль каждый раз, когда мы отправляем код.
  • git config —global credential. helper store

Выполнить модификацию .gitconfig Profile, добавьте в конец следующие строки

выполнено vim .gitconfig Просмотр

На этом вопрос заканчивается. Если у вас есть вопросы, оставьте сообщение.

Ссылки
на учетных данных

Как устранить ошибку, возвращенную запрашиваемым URL: 403 в репозитории git

Как устранить ошибку, возвращенную запрашиваемым URL: 403 в репозитории git

запрошенный URL-адрес вернул ошибку: 403 git push
git clone fatal: невозможно получить доступ к запрошенному URL-адресу возвращена ошибка: 403
gitlab запрошенный URL-адрес вернул ошибку: 403
запрошенный URL-адрес вернул ошибку: 400
запрошенный URL-адрес вернул ошибку: 403 codecommit
curl: (22) запрошенный URL-адрес вернул ошибку: 403 запрещено
tortoisegit запрошенный URL-адрес вернул ошибку: 403
невозможно клонировать репозиторий git

У меня несколько учетных записей в git. Я использовал код этой учетной записи три недели назад.Я не могу вытащить свой код. Я получал запрошенный URL-адрес вернул ошибку: 403 Я попробую нажать на Git, чтобы вернуть код ошибки 403 фатальный: HTTP-запрос не удался но я не смог решить свою ошибку

Завершено с ошибками, см. Выше.

У меня была такая же проблема при использовании git cli и sourcetree — и выполнение следующих действий решило ее.

Это в основном проблема с аутентификацией, и git сохранил мои кредиты как для битбакета, так и для github. Все, что мне нужно было сделать, это удалить эти сохраненные записи с помощью sourcetree.

Я использую SourceTree, поэтому перешел в Инструменты -> Параметры -> Аутентификация

и в разделе сохраненных паролей git удалил их все.

Этот пост может привести и к другим способам сделать то же самое.

Удалить учетные данные из Git

Запрошенный URL-адрес вернул ошибку: 403 Запрещено · Проблема, Я просматривал это видео, но это не решение моей проблемы.Фактически, мое репо является публичным, и репо моего коллеги тоже публичное. Проблема в том, что я не могу отправить изменения. Чтобы отправить изменения в GitHub с помощью этой более старой версии клиента, вы должны указать свое имя пользователя GitHub в URL-адресе HTTPS. Для этого выполните следующие действия: Войдите в свою учетную запись хостинга A2 с помощью SSH. В командной строке перейдите в каталог, в котором находится репозиторий Git. Введите следующую команду: git config -l | grep url

Также необходимо проверить уровень доступа , который должен быть установлен на запись .Это может произойти, если вы были добавлены в репо кем-то другим и забыли предоставить вам необходимые разрешения.

Ошибки клонирования HTTPS, У меня была такая же проблема при использовании git cli и sourcetree — и выполнив следующие действия, я решил ее. В основном это проблема аутентификации, и git сохранил мой клон через HTTPS Clone с помощью Git или проверку с помощью SVN, используя веб-адрес репозитория. ошибка: запрошенный URL-адрес вернул ошибку: 403 Запрещено при доступе к

Вот как я решил свою.

    Перейдите в bitbucket и откройте репозиторий.

В правом верхнем углу находится «кнопка клонирования»

Нажмите кнопку и скопируйте URL-адрес. Это будет выглядеть примерно так: git clone https: //[email protected]/something/something.git

  • Откройте свой терминал и введите следующий
  • Как разрешить запрошенный URL-адрес вернул ошибку: 403 в репозитории git, фатальный: невозможно получить доступ ‘https://github. com/[new-org sizes/[new-repopting.git/’): запрошенный URL-адрес вернул ошибку: 403. Я получаю указанную выше проблему, если пытаюсь нажать Сохранить файл конфигурации и выйти. теперь вы можете использовать git push origin master для синхронизации репо на GitHub. улучшить этот ответ. Создан 08 янв. 3 серебряных значка. 12 бронзовых знаков. Создан 14 окт. 21 серебряный значок. 33 бронзовых знака. Это часто встречается, когда вы клонируете с адресом только для чтения git (который используется по умолчанию, когда

    Решено: ошибка 403 при нажатии на репозиторий в новой организации, ошибка push : запрошенный URL-адрес вернул ошибку: 403 Запрещено при доступе к https : // github.com / srobertson421 / repo.git / info / refs Вероятно, я хочу отправить README.md на Github. Использование Ubuntu 14.04LTS Итак, я совершаю следующие шаги. echo «# test» >> README.md git init git add README.md git commit -m «first commit» git remote add

    Github HTTPS push 403 error, Как мне избавиться от исходного удаленного объекта, который уже существует? Недавние Посты. Изменение часового пояса вашего инстанса Amazon Linux EC2; Проверка формата универсального уникального идентификатора; Безопасная передача файлов между хостами с помощью SCP

    Нужна ваша помощь с github: в моем репозитории отказано в разрешении, git log.== github: создать новое репо с помощью readme. Скопируйте url. == git remote add origin Запрошенный URL-адрес вернул ошибку: 403 Сделайте это, чтобы исправить ваше репо: git Рад, что я могу помочь! Многое из этого я просто учусь с тобой. Я действительно не удосужился изучить все тонкости Git, как следовало бы, и прямо сейчас я изучаю внутреннее устройство Git.

    Комментарии
    • Credential Manager?
    • Я заметил, что битбакету иногда требуется до 10 минут, прежде чем новый пользователь, добавленный в репозиторий, сможет «потянуть», хотя это уже видно из веб-интерфейса.Я бы посоветовал любому, кто столкнется с неожиданной ошибкой 403, подождать некоторое время, прежде чем предпринимать другие шаги.

    //git-codecommit.ca-central-1.amazonaws.com Запрошенный URL вернул ошибку: 403

    Когда вы пытаетесь клонировать репозиторий, возникает ошибка. Чтобы решить эту проблему, следуйте инструкциям ниже.

    Прежде чем вы сможете подключиться к AWS CodeCommit в первый раз, вы должны выполнить шаги начальной настройки. После настройки профиля AWS и компьютера вы можете подключиться к репозиторию CodeCommit, а затем клонировать этот репозиторий на свой компьютер (также известный как создание локального репозитория)

    Шаг 1. Начальная настройка CodeCommit

    • Для настройки CodeCommit мы должны выполнить следующие действия.
    • Создайте учетную запись AWS, перейдя на сайт aws.amazon и выбрав Зарегистрироваться .
    • Создайте пользователя IAM или используйте существующего в своей учетной записи AWS. Убедитесь, что у вас есть идентификатор ключа доступа и секретный ключ доступа, связанный с этим пользователем IAM.
    • Войдите в Консоль управления AWS и откройте консоль IAM.
    • В консоли IAM в области навигации выберите Пользователи , а затем выберите пользователя IAM, которого вы хотите настроить для доступа CodeCommit.
    • На вкладке Разрешения выберите Добавить разрешения .
    • В Предоставить разрешения выберите Присоединить существующие политики напрямую .
    • В списке политик выберите AWSCodeCommitPowerUser или другую управляемую политику для доступа CodeCommit.

    Шаг 2. Установите Git

    Для установки Git мы рекомендуем такие сайты, как Git Downloads.

    Шаг 3. Настройте открытый и закрытый ключи для Git и CodeCommit

    Откройте эмулятор Bash.В эмуляторе запустите команду ssh-keygen , а затем сохраните файл в каталоге .ssh вашего профиля. Пример кода приведен ниже

    • Файл rsa , который является файлом закрытого ключа.
    • Файл rsa .pub, который является файлом открытого ключа

    Теперь выполните следующие команды, чтобы отобразить значение файла открытого ключа ( rsa . pub):

    Скопируйте содержимое файла и закройте Блокнот без сохранения. Содержимое файла выглядит примерно так:

    1. В консоли IAM на панели навигации выберите «Пользователи» и из списка пользователей выберите своего пользователя IAM.
    2. На странице сведений о пользователе выберите вкладку «Учетные данные безопасности», а затем выберите Загрузить открытый ключ SSH .
    3. Вставьте содержимое вашего открытого ключа SSH в поле, а затем выберите Загрузить открытый ключ SSH .
    4. Скопируйте или сохраните информацию в SSH Key ID (например, AKIATDBYMTTTWXP2O6H6 ).

    В эмуляторе Bash выполните следующие команды, чтобы создать файл конфигурации в каталоге

    Добавьте в файл следующие строки, где значение для Пользователь — это идентификатор ключа SSH, который вы скопировали ранее, а значение для IdentityFile — это путь и имя файла закрытого ключа:

    Сохраните файл как config (не config.txt), а затем закройте Блокнот. Теперь выполните следующую команду, чтобы проверить конфигурацию SSH:

    Шаг 4. Подключитесь к консоли CodeCommit и клонируйте репозиторий

    1. Откройте консоль CodeCommit.
    2. Найдите в списке репозиторий, к которому вы хотите подключиться, и выберите его. Выберите Clone URL , а затем выберите протокол, который вы хотите использовать при клонировании или подключении к репозиторию. Это копирует URL-адрес клона.
      • Скопируйте URL-адрес HTTPS, если вы используете учетные данные Git со своим пользователем IAM.
      • Скопируйте URL-адрес HTTPS (GRC), если вы используете команду git-remote-code commit на локальном компьютере.
      • Скопируйте URL-адрес SSH, если вы используете пару открытого / закрытого ключей SSH с вашим пользователем IAM.

    В эмуляторе Bash запустите команду git clone с URL-адресом SSH, который вы скопировали, чтобы клонировать репозиторий. Эта команда создает локальное репо в подкаталоге каталога, в котором вы запускаете команду. Например, чтобы клонировать репозиторий с именем MyDemoRepo в локальное репо

    Для получения дополнительной информации см. Подключение к репозиторию CodeCommit путем клонирования репозитория и создания фиксации.

    Источник

    This article discusses a problem that may occur when you try to push to a remote GitHub repository using HTTPS from an A2 Hosting server.

    Table of Contents

    • Problem
    • Cause
    • Resolution
      • Method #1: Use SSH
      • Method #2: Modify the HTTPS URL

    Problem

    When you try to push changes to a GitHub repository from an A2 Hosting server using an HTTPS URL, you receive the following error message:

    error: The requested URL returned error: 403 Forbidden while accessing https://github.com/github-username/github-repository-name.git/info/refs
    

    Cause

    There are a few possible causes for this problem:

    • You typed an incorrect password. Make sure you are using the correct GitHub password for the account.
    • The Git client on the A2 Hosting server requires a modified HTTPS URL to work correctly. If this is the cause, the password prompt does not even appear when you try to do a push operation.

    Resolution

    If you are sure you are using the correct GitHub password, there are two ways to resolve the “403 Forbidden” problem:

    Method #1: Use SSH

    Instead of using HTTPS URLs to push changes to GitHub, you can use SSH instead. For information about how to do this, please visit https://help.github.com/articles/changing-a-remote-s-url.

    Method #2: Modify the HTTPS URL

    Some A2 Hosting managed servers have an old version of the Git client installed. To push changes to GitHub using this older client version, you must include your GitHub username in the HTTPS URL.

    To do this, follow these steps:

    1. Log in to your A2 Hosting account using SSH.
    2. At the command prompt, change to the directory where the Git repository is located.
    3. Type the following command:
      git config -l | grep url

      You should see output that resembles the following:

      remote.origin.url=https://github.com/github-username/github-repository-name.git
    4. You need to add your GitHub username to the github.com portion of the URL. To do this, type the following command, replacing the values in red with your own account information:

      git remote set-url origin "https://github-username@github.com/github-username/github-repository-name.git"
      
    5. To verify the new remote URL setting, type the following command:

      git config -l | grep url
      

      Now when you try to push changes to the GitHub repository, you are prompted for a password, and the push operation should succeed.

    Error Description:

    • We can clone a copy of this repo over HTTPS authenticated.
    • We have made some commits and want to come back to the GitHub server. Using Cygwin on Windows 7 x64.
    C:cygwinhomeXPheriorCodelunch_call>git push
    Password:
    error: The requested URL returned error: 403 while accessing https://MichaelDrog
    [email protected]/derekerdmann/lunch_call.git/info/refs
    
    fatal: HTTP request failed
    

    Solution 1:

    Github give the idea it supports ssh way to read & write the repo, whereas https way also displayed ‘Read & Write’.

    • Now you need to change your repo config on your PC to ssh way:

    1. Edit .git/config file under your repo directory
    2. Find url=entry under section [remote "origin"]
    3. Change it from url=https://[email protected]/derekerdmann/lunch_call.git to url=ssh://[email protected]/derekerdmann/lunch_call.git. ie, change all the texts before @ symbol to ssh://git
    4. Save config file and quit. You can use git push origin master to sync your repo on GitHub

    Solution 2:

    • To login using https protocol, you should first set your authentication credential to the git Remote URI:
    • Now you’ll be asked for a password when try to git push.
    • In fact, this is on the http authentication format. Now you have to set a password :
    • You should be aware that your github password will be stored in plaintext in your .git directory, which is undesirable.

    Solution 3:

    • On behalf of editing .git/config file manually, you can use git remote set-url command.
    • In your case it should be:

    Solution 4:

    • Edit .git/config file under your repo directory
    • Find url= entry under section [remote "origin"]
    • Change it from url=https://github.com/rootux/ms-Dropdown.git to https://[email protected]/rootux/ms-Dropdown.git
    • Where USERNAME is your github user name

    Solution 5:

    • When permission denied 403 error while using ssh(according to Xiao) or http urls you can also try these commands
    git config --global --unset-all credential.helper
    
    git config --unset-all credential.helper
    

    With administrator rights

    git config --system --unset-all credential.helper
    

    UP NEXT IN GIT

    • Git Tutorial
    • Git Interview Questions and Answers
    • Git HR Interview Questions and Answers
    • Git Sample Resume
    • Git Interview Dress Code
    • Git Job Apply Letters
    • Git Forums

    HTTPS cloning errors

    There are a few common errors when using HTTPS with Git. These errors usually indicate you have an old version of Git, or you don’t have access to the repository.

    Here’s an example of an HTTPS error you might receive:

    > error: The requested URL returned error: 401 while accessing
    > https://github.com/USER/REPO.git/info/refs?service=git-receive-pack
    > fatal: HTTP request failed
    > Error: The requested URL returned error: 403 while accessing
    > https://github.com/USER/REPO.git/info/refs
    > fatal: HTTP request failed
    > Error: https://github.com/USER/REPO.git/info/refs not found: did you run git
    > update-server-info on the server?

    Check your Git version

    There’s no minimum Git version necessary to interact with GitHub, but we’ve found version 1.7.10 to be a comfortable stable version that’s available on many platforms. You can always download the latest version on the Git website.

    Ensure the remote is correct

    The repository you’re trying to fetch must exist on GitHub.com, and the URL is case-sensitive.

    You can find the URL of the local repository by opening the command line and
    typing git remote -v:

    $ git remote -v
    # View existing remotes
    > origin  https://github.com/ghost/reactivecocoa.git (fetch)
    > origin  https://github.com/ghost/reactivecocoa.git (push)
    
    $ git remote set-url origin https://github.com/ghost/ReactiveCocoa.git
    # Change the 'origin' remote's URL
    
    $ git remote -v
    # Verify new remote URL
    > origin  https://github.com/ghost/ReactiveCocoa.git (fetch)
    > origin  https://github.com/ghost/ReactiveCocoa.git (push)

    Alternatively, you can change the URL through our
    GitHub Desktop application.

    Provide an access token

    To access GitHub, you must authenticate with a personal access token instead of your password. For more information, see «Creating a personal access token.»

    If you are accessing an organization that uses SAML SSO and you are using a personal access token (classic), you must also authorize your personal access token to access the organization before you authenticate. For more information, see «About authentication with SAML single sign-on» and «Authorizing a personal access token for use with SAML single sign-on.»

    Check your permissions

    When prompted for a username and password, make sure you use an account that has access to the repository.

    Tip: If you don’t want to enter your credentials every time you interact with the remote repository, you can turn on credential caching. If you are already using credential caching, please make sure that your computer has the correct credentials cached. Incorrect or out of date credentials will cause authentication to fail.

    Use SSH instead

    If you’ve previously set up SSH keys, you can use the SSH clone URL instead of HTTPS. For more information, see «About remote repositories.»

    Error: Repository not found

    If you see this error when cloning a repository, it means that the repository does not exist or you do not have permission to access it. There are a few solutions to this error, depending on the cause.

    Check your spelling

    Typos happen, and repository names are case-sensitive. If you try to clone git@github.com:user/repo.git, but the repository is really named User/Repo you will receive this error.

    To avoid this error, when cloning, always copy and paste the clone URL from the repository’s page. For more information, see «Cloning a repository.»

    To update the remote on an existing repository, see «Managing remote repositories».

    Checking your permissions

    If you are trying to clone a private repository but do not have permission to view the repository, you will receive this error.

    Make sure that you have access to the repository in one of these ways:

    • The owner of the repository
    • A collaborator on the repository
    • A member of a team that has access to the repository (if the repository belongs to an organization)

    Check your SSH access

    In rare circumstances, you may not have the proper SSH access to a repository.

    You should ensure that the SSH key you are using is attached to your personal account on GitHub. You can check this by typing
    the following into the command line:

    $ ssh -T git@github.com
    > Hi USERNAME! You've successfully authenticated, but GitHub does not
    > provide shell access.

    If the repository belongs to an organization and you’re using an SSH key generated by an OAuth App, OAuth App access may have been restricted by an organization owner. For more information, see «About OAuth App access restrictions.»

    For more information, see Adding a new SSH key to your GitHub account.

    Check that the repository really exists

    If all else fails, make sure that the repository really exists on GitHub.com!
    If you’re trying to push to a repository that doesn’t exist, you’ll get this error.

    Error: Remote HEAD refers to nonexistent ref, unable to checkout

    This error occurs if the default branch of a repository has been deleted on GitHub.com.

    Detecting this error is simple; Git will warn you when you try to clone the repository:

    $ git clone https://github.com/USER/REPO.git
    # Clone a repo
    > Cloning into 'repo'...
    > remote: Counting objects: 66179, done.
    > remote: Compressing objects: 100% (15587/15587), done.
    > remote: Total 66179 (delta 46985), reused 65596 (delta 46402)
    > Receiving objects: 100% (66179/66179), 51.66 MiB | 667 KiB/s, done.
    > Resolving deltas: 100% (46985/46985), done.
    > warning: remote HEAD refers to nonexistent ref, unable to checkout.

    To fix the error, you’ll need to be an administrator of the repository on GitHub.com.
    You’ll want to change the default branch of the repository.

    After that, you can get a list of all the available branches from the command line:

    $ git branch -a
    # Lists ALL the branches
    >   remotes/origin/awesome
    >   remotes/origin/more-work
    >   remotes/origin/new-main

    Then, you can just switch to your new branch:

    $ git checkout new-main
    # Create and checkout a tracking branch
    > Branch new-main set up to track remote branch new-main from origin.
    > Switched to a new branch 'new-main'

    While working with Github you may face that, Git is saying 403 when trying to perform the git push origin master command. This fatal error occurs because password authentication for accessing Github’s private repository has been disabled. The error looks like,

    fatal: unable to access 'https://github.com/username/location.git/': The requested URL returned error: 403

    If you are struggling with the error here is a quick solution for you.

    Step 1: Create Personal Access Token on Github

    • Log in to your GitHub account
    • Click on the Profile logo on the top right corner
    • Click on Settings
    • Then, Click on Developer settings for the left sidebar
    • Next, Click on Personal access tokens for the left sidebar
    • After that, Click on Generate new token
    • Give your token a descriptive name on the Note field
    • Select Expiration time and preferred scopes
    • Click on Generate token
    • Finally, you can copy that token and use it to authenticate. You can use the token instead of a password for Git over HTTPS or can use it to authenticate to the API over Basic Authentication.

    Step 2: Use Personal Access Token for Authentication

    Using HTTPS URL

    Personal access tokens can only be used for HTTPS Git operations. Once you have a token, you can enter it instead of your password when performing Git operations over HTTPS. For the existing remote repository, you need to update the remote URL by using,

    $ git remote set-url origin https://[githubtoken]@github.com/[username]/[repositoryname].git
    $ git push origin master

    Or, while cloning any repository,

    $ git clone https://github.com/username/repo.git
    Username: Enter your username
    Password: Enter your access token
    Using SSH

    For performing Git operation you just need to change the URL. First, make sure your SSH keys are correctly set up. Then, To update the URL you have to run

    $ git remote set-url origin git@github.com:[username]/[repositoryname].git
    $ git push origin master

    Thank you for reading the article. Hope following the steps properly will solve your problem.

    But if still, you are facing a problem to generate or use your Personal Access Token and perform Git Operations you can read this article with details step by step process.

    Remote: Permission to UserName/repo.git denied to OtherUserName fatal: unable to access ‘https://github.com/UserName/repo.git/’: The requested URL returned error: 403

    February 6, 2020 08:47PM

    I was working on the one of the clients project hosted on github.com, I cloned the repo locally added few files to local repo and staged/committed project locally all was good.

    git add .
    git commit -m 'test'

    But when tried to push the changes on remote repo on github.com. I was receiving below error. 

    git push origin master
    remote: Permission to UserName/repo.git denied to AnotherUserName.
    fatal: unable to access 'https://github.com/UserName/repo.git/': The requested URL returned error: 403

    Powershell visual studio code vscode git add git commit -message git push origin git remove permission denied the requested URL returned error 403.png

    This error says that you are using wrong credential or wrong repo: the fact is when you are pushing its not asking for credentials, below are the possible reasons.

    1. Username needs to be the user, not the email
    2. Ensure you provide the proper password. If you have 2FA enabled on GitHub, you need to make sure you create an Access Token with proper access permissions and use the token as password instead.
    3. Repo format is: https://github.com/<user>/<repo>.git
    4. You have 2 different github (version control) accounts

    403 means GitHub is not granting you access so one or more of the 4 above cause are the problem. In my case this issue happened due to I have one personal github account  and second received from client. Until now I was using my github account and in the past when I did push for the first time it asked my github credentials which got saved/ cached in windows credential manager, and today for the first time when I am using second account it is using username and password cached earlier for previous github account, causing access denied error.

    You can solve this problem by using few methods. But below simple method helps you to solve the issue.

    step 1: Go to Control Panel.
    step 2: In the control panel find and go to user accounts
    step 3: After that go to credential manager
    step 4: Then Windows credentials
    step 5: Go to Generic credentials, and search github.com, expand it
    step 6: Finally delete the Github keys.

    git error 403 remote access denied control panel user accounts credential manager git git hub remove generic windows credentials persistence git push origin master.png

    Once cached credentials are removed, try pushing project on remote by running command git push origin master, This will prompt for GitHub login prompt, once the authentication is successful with correct username and password, command will succeed and files/folders are pushed successfully on remote github repo.

    git push origin master git error 403 remote access denied another user control panel user accounts credential manager git github remove generic windows credentials persistence.png

    If you don’t want to remove previous users credentials from windows credentials manager another way to resolve this issue is give previous user access over new github.com repo.

    Useful Article
    Solved Visual studio Code make sure you configure your user.name and user.email in git
    Part 1 Git version control integration in Visual Studio Code
    Part 2 Git master branch source control integration in Visual Studio Code
    Part 3 Git clone version control integration in Visual Studio Code

    Go Back

    Понравилась статья? Поделить с друзьями:

    Читайте также:

  • Git push u origin main ошибка
  • Git push rejected unpacker error
  • Git push origin master error src refspec master does not match any
  • Git push origin main error src refspec main does not match any
  • Git push error permission to denied to

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии