如何作为协作者从命令行签出GitHub项目? [英] How do I checkout a GitHub project from command line as a Collaborator?

查看:92
本文介绍了如何作为协作者从命令行签出GitHub项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这似乎是一个简单的问题,应该有一个简单的答案...

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

我正在尝试签出GitHub项目。该项目由其他人拥有,所以其他人是 Owner 。 GitHub 协作者具有读/写访问权限,我已获得该项目的协作者权限。协作者与贡献者稍有不同,他们过去只是提供拉取请求。

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

我觉得我需要证明自己的身份,并发送密码或SSH密钥。但是GitHub在我应该使用哪个远程URL的帮助下?仅在桌面客户端的上下文中讨论SSH。我想他们有一个要我使用的应用程序,但我真的不想使用。

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.

注意:我有信息在Git的 global 配置中( user.name user.email ),但不是

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

如何从命令行中以 Collaborator 的身份签出基于GitHub的项目?

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

推荐答案

使用HTTP端点而不是SSH端点。

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项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆