5
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

【GIT】git pushするときに直接ユーザ名を指定する方法

Posted at

git pushしたら、

remote: Permission to aaaa/hogehoge.git denied to [意図しないユーザ名].

ってでてきたりして困るときがあります。

git globalに意図しないユーザが登録されているからだと思うのですが、
僕みたいなgit初心者は「どうしよう!どうすればいいの!」ってなっちゃいます。

そんなときは、

git push https://[pushしたいユーザ名]@github.com/aaaa/hogehoge.git master

という形でpushしてあげるといけます。

多分はじめcloneしてくるときに上記のURLでcloneしてくれば大丈夫なんだと思う・・・

5
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?