How do I checkout a GitHub project from command line as a Collaborator?

别来无恙 提交于 2020-01-06 19:27:13

问题


This seems like a simple question which should have a simple answer...

I'm trying to checkout a GitHub project. The project is owned by someone else, so someone else is the Owner. GitHub Collaborators have read/write access, and I have been granted collaborator rights on the project. Collaborators are slightly different than Contributors, who have simply provided a pull request in the past.

I'm trying to avoid the following because I do not want the source files in "read-only" mode:

git clone https://github.com/user/project.git

I feel like I need to identify myself, and send my password or SSH key. But GitHub's help at Which remote URL should I use? only discusses SSH in the context of a Desktop client. I guess they have an app they want me to use, but I don't really want to use one.

Note: I have information in Git's global config (user.name and user.email), but its not the correct information/credentials for these purposes.

How do I checkout a GitHub based project as a Collaborator from the command line?


回答1:


Using the the HTTP endpoint instead of the the SSH one.

As an aside, when you say checkout do you mean clone, fork or pull?

for clone it would be similar to this:

git clone https://github.com/user/project.js.git

You will be prompted for your user name and password.



来源:https://stackoverflow.com/questions/30656741/how-do-i-checkout-a-github-project-from-command-line-as-a-collaborator

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!