我想在我的計算機上使用兩個github用戶帳戶。我已經有過命令從不使用SSH的全局用戶帳戶的git用戶帳戶推送或提交
git config --global user.name primary_username
和
git config --global user.email primary_email
現在我有,我想用另一個帳戶的儲存庫temp_repository配置的全局用戶設置。 所以我用下面的命令來設置本地配置只有庫:
git config user.name secondary_username
和
git config user.email secondary_email
但是當我嘗試使用命令「混帳推-u起源執行初始推主人,我得到這個錯誤:
remote: Permission to temp_repository denied to primary_username. fatal: unable to access ' https://github.com/secondary_username/temp_repository.git ': The requested URL returned error: 403
即使單獨設置配置爲本地資源庫後,我得到這個錯誤。 我不想使用SSH密鑰,因爲我認爲我只會暫時使用此帳戶。
問題是,爲了能夠推入github你需要設置ssh證書。 https://help.github.com/articles/adding-a-new-ssh-key-to-your-github-account/ – eftshift0
我可以做到這一點,沒有SSH太對了?因爲我還沒有在我的電腦中設置任何ssh密鑰。 – vaibhavS
我可能是錯的.....但我不這麼認爲。 – eftshift0