2016-04-13 12 views
2

私のものではないマシンでGithubに新しいレポをプッシュしようとしています。しかし、次のエラーが表示されます。httpsで別のユーザーを使用してGitHubにプッシュ

user (master) sample_app $ git push -u origin master 
remote: Permission to ME/sampleapp.git denied to NOTMYUSERNAME. 
fatal: unable to access 'https://github.com/ME/sampleapp.git/': The requested URL returned error: 403 

なぜ私のユーザー名とパスワードの入力を求められないのですか?それはhttpsを超えていますか?

編集: グローバルなgitconfigファイルを編集して古いユーザ名を削除しようとしました。しかしそこには「NOTMYUSERNAME」の言及はないようです。

+0

あなたの '〜/ .gitconfig'で' [資格] 'セクションがありますか? – Ryan

+0

このレポにアクセスできますか? '-u'を使わずに単純なgit push origin masterを使ってみてください。 – Aparna

+0

ライアン - 現地レポフォルダ内からSUBL〜/ .gitconfigを実行した後: [カラー] \t UI =自動 [コア] \tエディタ= SUBL -n -w [プッシュ] \tデフォルト=上流 【merg] \t conflictstyle =のdiff3 [ログ] \t日付=ローカル [フィルタ "LFS"] \tクリーン=のgit-LFSクリーン% \t汚れ=のgit-LFS F \t fの%を必要とする汚れd = true – pmk

答えて

2

このレポのgit認証情報を設定しましたか?

実行git config -lとあなたのuser.nameと user.email が正しく設定されていることを確認してください。そうでない場合

は、ちょうどこのレポのためにローカルに設定します。

git config user.name "Your Name"

git config user.email "Your email"

あなたはまた、コマンドラインを介してこれらの引数を渡すことができ

git -c "user.name=Your Name" -c "user.email=Your email" commit ...

てきましたあなたはあなたのリモコンをチェックしましたか?すべてが正しいようであればgit push <remote> <branch>は、ユーザー名とパスワードを求めるプロンプトを表示する必要があり、

origin https://github.com/<user>/<repo>.git (fetch)

origin https://github.com/<user>/<repo>.git (push)

呼び出すgit remote -vはあなたのような何かを示さなければなりません。

+0

ユーザー(マスター)を持つ任意の運を持っていないよsample_app $ gitの設定-l color.ui =自動 core.editor = SUBL -n -w push.default =上流 merg .conflictstyle =のdiff3 log.date =ローカル filter.lfs.clean =のgit-LFSクリーン%のF filter.lfs.smudge =のgit-LFSは汚れ%のF filter.lfs.required =真 core.repositoryformatversion = 0 core.filemode =真 core.bare = falseを core.logallrefupdates =真 core.ignorecase =真 core.precomposeunicode =真 remote.origin.url = HT tps://github.com/MYGITPROFILE/sampleapp.git remote.origin.fetch = + refs/heads/*:refs/remotes/origin/* – pmk

+0

ユーザー(マスター)sample_app $ git config user.name "My Name" ユーザー(マスター)sample_app $ gitの設定user.email "[email protected]" ユーザー(マスター)sample_app $ gitのリモート-v 起源\t https://github.com/MYGITPROFILE/sampleapp.git(フェッチ) origin \t https://github.com/MYGITPROFILE/sampleapp.git(プッシュ) ユーザー(マスター)sample_app $ gitプッシュオリジンマスター remote:MYGITPROFILE/sampleapp.gitへの許可がNOTMEに拒否されました。 致命的: 'https://github.com/MYGITPROFILE/sampleapp.git/'にアクセスできません:リクエストされたURLがエラーを返しました:403 – pmk

+0

まだ問題は解決していません。 – pmk

関連する問題