我分叉了一个我想贡献的现有项目,
我正在尝试以最简单的方式做到这一点。来自树莓派。 为了简单起见,我更改了电子邮件地址和项目名称
我不明白为什么这行不通,新存储库位于https://github.com/username/project
请帮助我了解缺少的内容,在github上在线找到的说明还不够
pi@raspberrypi:~ $ git config --global user.name "username"
pi@raspberrypi:~ $ git config --global user.email "username@email.com"
pi@raspberrypi:~ $ git clone https://github.com/username/project
Cloning into 'project'...
remote: Enumerating objects: 23, done.
remote: Counting objects: 100% (23/23), done.
remote: Compressing objects: 100% (18/18), done.
remote: Total 1450 (delta 9), reused 16 (delta 5), pack-reused 1427
Receiving objects: 100% (1450/1450), 2.28 MiB | 0 bytes/s, done.
Resolving deltas: 100% (1019/1019), done.
pi@raspberrypi:~ $ cd project
pi@raspberrypi:~/project $ git add --all
pi@raspberrypi:~/project $ git commit -am "mychange"
[master 1732397] mychange
20 files changed, 2613 insertions(+), 2248 deletions(-)
create mode 100644 newfile.cpp
pi@raspberrypi:~/project $ git push
Username for 'https://github.com': username@email.com
Password for 'https://username@email.com@github.com':
remote: Permission to username/project.git denied to myname.
fatal: unable to access 'https://github.com/username/project/': The request ed URL returned error: 403
答案 0 :(得分:0)
GitHub请求的用户名不应是电子邮件地址。 (username@email.com
)
它应该是您的GitHub用户帐户名。
除非您拥有2FA activated,在这种情况下,用户名仍然是您的GitHub帐户,但是your password would be a PAT (Personal Access Token)