Cuando bash presionar mi código usando git push origin master
, me pide la contraseña para 'https://test_ankit@bitbucket.org'
pero mi nombre de usuario real es 'rest_ankit'.
He usado este command para cambiarlo 'git config –global user.name' rest_ankit '', pero no funcionó. sigue pidiendo la contraseña para el nombre de usuario incorrecto, y mostrando que la authentication falló. Por favor, ayúdenme. Gracias.
Puedes cambiar la URL de origen con:
git remote set-url https://rest_ankit@bitbucket.org/username/reponame.git
Eso cambiará el nombre de usuario asociado con la url también.
Use la URL completa de su repository, no solo bitbucket.org
, sino bitbucket.org/username/reponame.git
, reemplazando el username
y el username
con los valores correctos.
Tenga en count que las cnetworkingenciales http no tienen nada que ver con git config user.name
: este último es el usuario para la autoría de commit, no para la authentication durante push / pull.
ssh
git remote set-url origin git@bitbucket.org:{new team or account name}/{repository name}.git
https
git remote set-url origin https://{username}@bitbucket.org/{new team or account name}/{repository name}.git
luego verifica los cambios usando
git remote -v
Si tiene problemas mientras empuja y el control remoto no ha cambiado, escriba
para ssh
git remote set-url --push origin git@bitbucket.org:{new team or account name}/{repository name}.git
para https
git remote set-url --push origin https://{username}@bitbucket.org/{new team or account name}/{repository name}.git