Problem konfrontiert:
Ich kann nicht git push
meine Repo, Fehlermeldung:Github - Erlaubnis verweigerte altes Konto
remote: Permission to fishercoder1534/Leetcode.git denied to MY_OLD_GITHUB_ACCOUNT
fatal: unable to access 'https://github.com/fishercoder1534/Leetcode.git/':
The requested URL returned error: 403`
Forschung habe ich getan:
- an diesen post suchen, ich habe alle diese korrekt auf meinen neuen GitHub-Account:
git config --global user.name "NewAccountFirstname NewAccountLastname" git config --global user.email "[email protected]"
- Ich habe meine alten SSH-Schlüssel gelöscht, generiert neue ss h Schlüssel, legte sie unter ~/.ssh /, fügen Sie sie auch in meinem neuen Github-Konto.
- Ich habe eine ~/.ssh/config-Datei mit folgendem Inhalt erstellt, wie durch die oben genannte Post vorgeschlagen:
Host github.com User git IdentityFile ~/.ssh/id_rsa # wherever your "new" key lives IdentitiesOnly yes
- ich
$ssh -vT [email protected]
ausgeführt habe, die alle meine neue Github Kontoinformationen zeigen.Hi fishercoder1534! You've successfully authenticated, but GitHub does not provide shell access.
- Ich habe
$ssh -i ~/.ssh/id_rsa -vT [email protected]
laufen, ist es auch Informationen meine neue Github ist zeigt, mitHi fishercoder1534! You've successfully authenticated, but GitHub does not provide shell access.
Was/Hilfe zu versuchen, nächste Option ist?
Das ist richtig: 'git config-credential.helper', gibt sie mir' osxkeychain' – FisherCoder
@ fishercoder1534 I habe einen Link hinzugefügt, über den Sie Ihre https-Anmeldedaten aktualisieren können. – VonC
@ fishercoder1534 kein Problem: erinnern, https und ssh sind zwei verschiedene Protokolle: https://git-scm.com/book/en/v2/Git-on-the-Server-The-Protocols#The-HTTP-Protocols vs https://git-scm.com/book/en/v2/Git-on-the-Server-The-Protocols#The-SSH-Protocol – VonC