Github Remote Permission

I am trying to upload my repository to github and go through all the steps to:

git push -u origin master

at this moment it gives me the following error:

remote: permission for samrao2 / manager-4.git denied to samrao1.

Fatal: Cannot access https://github.com/samrao2/manager-4.git/ : The requested URL returned an error: 403

I think the problem is that I logged in to another Git account before "samrao1", and now I'm trying to click on "samrao2".

Can someone help me reset this to where I can successfully click on "samrao2". I assume that I will be asked to enter my password the first time I try to do this.

+18
source share
3 answers

https : SSH ( SSH, , )

. , Git ( GitHub ) , .

, , ( ) ( /), .

git config credential.helper 

Mac, Arpit J, / access->, github.com file-> .

https://help.github.com/assets/images/help/setup/keychain-access.png

. " OSX"

., Windows Windows.
Windows , : , .

( BitBucket)

https://kwilson.io/blog/wp-content/uploads/2015/01/4-store.png


(. git credential):

git credential reject
protocol=https
host=github.com
<empty line here>

& :

git credential fill
protocol=https
host=github.com
<empty line here>
+45

, , , , " ", , Github SSH.

, : SSH Github

, 'git://github.com/samrao2/manager-4.git/' URL, https://github.com/samrao2/manager-4.git/. , , SSH, . URL- git https, :

git remote set-url origin git://github.com/samrao2/manager-4.git

.

+2

If you are using MacOS, you can

  1. Go to KeyChain Access,
  2. Search "GitHub",
  3. then when the result “github.com” appears, change the account or password to a new one and save.

Then everything is ready!

+1
source

Source: https://habr.com/ru/post/1692641/


All Articles