Administrator@USER-20140 /D/website/flxx2/basic/vendor/g9901/yii2-gftp (master)
$ git remote -v
origin git@github.com:G9901/yii2-gftp.git (fetch)
origin git@github.com:G9901/yii2-gftp.git (push)
upstream https://github.com/hguenot/yii2-gftp.git (fetch)
upstream https://github.com/hguenot/yii2-gftp.git (push)
G9901/yii2-gftp
是我 fork 来自 hguenot/yii2-gftp
,我现在在本地修改了,然后git push
,可 hguenot/yii2-gftp
并没有收到提交。而我发现在 hguenot/yii2-gftp
是可以直接在网页上进行 pull request
然后commit
,为什么不能客户端提交?
Administrator@USER- /D/website/flxx2/basic/vendor/g9901/yii2-gftp (master)
$ git push upstream
Username for 'https://github.com': G9901
Password for 'https://G9901@github.com':
remote: Permission to hguenot/yii2-gftp.git denied to G9901.
fatal: unable to access 'https://github.com/hguenot/yii2-gftp.git/': The request
ed URL returned error: 403
无法提交到 upstream ,那么原作者就无法知道有修改,无法操作合并,可问题是我在github.com的网页里面却可以提交 commit,如何才可以在我客户端提交过去。
稀里糊涂的
现在在 github.com 网页上提交了,又变成这样了: https://github.com/hguenot/yii2-gftp/pull/5
G9901 wants to merge 4 commits into hguenot:master from G9901:master
使用 git push 默认将推送到 origin 对应的远程仓库,所以 upstream 是没有的获得commit 的,如果要推送到 upstream 有两个要求,第一是你对 hguenot/yii2-gftp.git 有写的权限,也就是你加入了此项目。第二是显式的推送 git push upstream ,提示上说明你没有对 hguenot/yii2-gftp.git 写的权限。Pull/Request 是一个 fork 项目提交了修改合并的机制,适用于fork 项目对原有项目无权限的修改提交。