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

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?

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.

Related

Copy all repos of an organisation to another account

I'm part of an organisation on github and would like to copy all the repos of that organisation to another regular github account at once.
I thought there would be a tool to help me to do this easily but haven't found one yet. What would be the easiest way to approach this? Thank you
I have tried looking into gh but I'm not sure it's the right tool for it. All I'm trying to do is basically cloning all the repos of the organisation I am a part of to another github account in one go
I have tried looking into gh but I'm not sure it's the right tool for it.
Considering there does not seem to be a native feature allowing for a bulk copy you want, gh is actually a good option.
Depending on the fork policy of your organization and the nature of said repositories (public or private), you should be able to write a script, using the GitHub CLI gh, which would:
list the repositories of an organization (gh repo list)
fork it (gh repo fork)
Note that will not copy issues or pull-requests.

GitHub - How to clone repository on a shared server without giving access too all my repos

My question is the same as Github add SSH key from others will grant access to all repos?, except my use case is that I am working on a shared server with other contributors. We all need access to a certain repository on this server. However, since GitHub requires SSH now, how can I clone and use the repository without adding my SSH key to the server and allowing everyone else access to all of my personal repositories?
I have already added my teammates as contributors in the repo we want to clone; it would be nice if we could each individually use our username and passwords to interface with the repo (like the old HTTPS method of cloning git repositories) without having to share our private keys with each other. If there is an option to only allow SSH access to a specific repo, that would be nice as well.
The only workaround I can think of right now is to create a dummy GitHub account with the sole purpose of accessing this repo, and registering our SSH key with that GitHub account. But this seems very contrived and I'm wondering if there is a better solution to this problem.
A dummy github account with only the right permissions to access the one repo is what GitHub calls a Machine Account and is the recommended way to provide access under scenarios like these.
Alternatively, you could use a deploy token, those are bound to a single repo by default.

How to fix the wrong identification on commits from GitHub desktop?

Even though I have connected my account to GitHub desktop, commits I make from there are somewhat not linked to my account.
I also should indicate that email I am using GitHub Desktop with has the same email with my account (#kutayeroglu)
Thank you for your time and answers!
I couldn't find the exact solution to my question. However, here is my new method which prevents this error;
Firstly, I use terminal instead of GitHub Desktop. (Using terminal really allows me to better understand git structure. Highly recommended.)
Use "git init" in the file you want to create a repository in.
Set up information with the following commands. E-mail and the username you enter here should be the same with your GitHub account.
git config --global user.name "kutayeroglu"
git config --global user.email "kutay#example.com.tr"
Hope this helps anyone having a similar problem!

First time using github and want to know command to access a repository

I just installed github in ubuntu and i don't know the commands to login with my username and password and command to access a repository and work on it
Thanks
Best way for linux is probably to give github your public key in your settings page, rather than log in as such. Then you can add a github repository to your local repository with git remote add git#github.com:<repopath> and push/pull from it with git push and git pull respectively using SSH for authentication instead of username and password.
If you don't understand any of what I've just said, I'd recommend looking at some tutorials, like this GitHub help article or Try Git.

github Committing

I have got github ssh details to get the client project, i never worked on github before. So sorry for this stupid question. I Have ssh keys(public,private which was generated under filezila from my system - ubuntu 10.04) and client has added those keys into his repos. And he has given commiting url from github to my system.
I have installed and made a test project under my account in github with the ubuntu system. But not able to commit the client work.
His url is somthing like this,
ssh://git#domain.com:/home/git/project.git
how can i commit this project files,
i guess i have to add those ssh private,public keys under this github installation but i dont know how to add. Please help me.
Add an SSH key to your github account, see their help page for more information. Make sure to test that it's been set up properly.
Ask your friend to add you as a collaborator to the project: Project page -> Admin -> Collaborators.
Clone the repo at home and have fun committing! The URL will look something like this:
git#github.com:USERNAME/PROJECTNAME.git
So example on linux:
git clone git#github.com:USERNAME/PROJECTNAME.git