How do I checkout a GitHub project from command li

2019-09-05 14:26发布

问题:

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.



标签: github clone