it's going on day 3 , have still not been able resolve following issue:
i created github account 2 years ago. believe generated ssh key account. believe had loaded ssh key ssh-agent program , placed public key on github account.
now created new github account. created repo , cloned repo pc. after making couple commits, attempted push changes repo. however, stated didn't have permission repo stating along line of 'permission denied repo - oldusername not have access rights'. appeared git bash referencing oldusername when attempting push changes.
i attempted changing config information via 'git config user.name' , etc. etc. however, didn't seem fix problem. stumbled across stating need ssh key. looked further , came realization current git bash referencing ssh key associated old account. deleted old key on computer, , deleted key old github account.
i proceeded generate new ssh public/private key pair. loaded (or believe) new private key ssh-agent. added public key new github account. note left 'passphrase' option blank didn't understand immediate purpose of it.
after these changes, attempted push changes made remote repo. however, again received error "oldusername doesn't have permission push changes repo".
so appears git bash still referencing old username. why this? git bash use ssh-agent's loaded ssh-key determine identify? if case though, why still referencing old github user name? p.s. i'm on windows 10, git 2.9.3.2.
any thoughts?
i think key here used https clone new repository.
i suspect credentials being cached credentials helper. see this:
https://help.github.com/articles/caching-your-github-password-in-git/#platform-windows
on windows, if you've used wincred helper (git config --global credential.helper wincred
), stores credentials in windows credential store has control panel interface can delete or edit stored credentials. see instance:
with store, details secured windows login , can persist on multiple sessions. added in git windows 1.8.1.1.
so either:
try clearing credential cache https cloned repo using following , try again:
git credential-osxkeychain erase host=github.com protocol=https
or,
- edit credentials using windows control panel's credential manager.
Comments
Post a Comment