GitHub repository as contributor - github

I created a repository and added a contributor, and this was our mutual work. In my GitHub account it appears as a repository and in his account is does not.
We want that his account will have this exact same repository as shown in my repos.
How can we do it? :)

Each repository is owned by a single individual or organization account. If you store your repository under your personal account, you would be the owner and your colleague can be made a collaborator. In this case, like you mention, the repository would be listed only in your account's repository list. To give equal "credit" to your collaborator, you could do one of the following:
Pin the repository: Your collaborator can pin any repository they contributed to to their profile page. While the repository would still appear under your name, it will be prominently visible on your collaborator's profile.
Create an organization: You could create an organization where both of you are owners. The repository will then appear in neither of your individual profiles, and both your individual accounts can be publicly listed as members of the organization.

Related

Git hub Organization

I have a problem in creating a git organization. The problem is, I already created a Git organization, but then a deleted it. When I tried to create an organization with the same name. It says its unavailable.
Citation from Github Docs:
When you delete an organization, all repositories, forks of private
repositories, wikis, issues, pull requests, and Project or
Organization Pages are deleted as well. Your billing will end, and
after 90 days the organization name becomes available for use on a new
user or organization account.
I guess, you should wait for 90 days, or try another name.

How to access private repositories on Github and Bitbucket without permission of admin

So, my question is:
How to access private repositories of Bitbucket/Github or any other online web-based version control repository hosting service.
Any feedback is most welcome.
Thanks
Steve Washer
I'll only speak for github as a daily github user. The only way to access them is either by being member of the repository or outside collaborator of the repository. Owner of the repo can add you to it in the repository Settings.
Another way is to ask any of the members to provide you the personal access token, which you could use to read the repository via the API. This is however, unsafe.
Yet another way is asking the repository owner or any repo user to add your public SSH key to his account so you may have repo access (clone, commit) without ability to view it on github.com
Summary: you always need to talk to the owner or any of the current repository members. Private repo will never be accessible otherwise.

Add collaborator to many repositories at once

We have 150+ repositories on our GitHub, for different clients. Now we hired new employee to take care of the managed services process and he requires access to all the repositories. Inviting him as a collaborator to all repositories one by one is going to take plenty of time.
Is there a way to add him to all repositories at once? A command or some trick in GitHub that I do not know.
If those GitHub repositories were all part of the same organisation, that would be easy: see "Inviting users to join your organization"
If not, you can script that with the GitHub API:
list all your repositories
for eeach repo, add your collaborator to it.

Can a github collaborator commit their changes to a public repo?

I was added as collaborator to a public GitHub repo and I was able to make changes to the main branch. A pull request was not generated, the changes just went right in. I am using Visual Studio 2015 as my client, for what it's worth.
Yes, it depends on the permission.
There are 4 types of permissions:
Read
Write
Admin
Owner
Note: Organization members with owner permissions have extensive permissions across all repositories in an organization.
See the permissions and associated actions at Repository permission levels for an organization and Collaborator access on a repository owned by a user account.
Yes, it is either your responsibility to properly follow process (i.e., create a branch and then create the pull request to merge to master / release / etc) or/and up to the repo owner to set up permissions so committing directly to master is not possible.
Yes, that's basically what collaborators are. :)
See Github - Collaborator access on a repository owned by a user account
Often, even if you have collaborator access/rights, you can choose to adopt a more kosher Git workflow, like creating a branch and a pull request for each 'thing' that goes into the main branch.

Github: Repository not found

$ git push -u origin master
ERROR: Repository not found.
fatal: The remote end hung up unexpectedly
I'm quite sure the repository is there and I added it correctly. The problem may be that I am using two github accounts. One is my personal one and one is for a client. I'm trying to get it on the client's github as a private repository.
I am able to create a repository and push it to my personal github account. But I can't get it to push to my client's account.
You probably do not have permission to push to your client's repository. To get access, the easiest way would be if your personal GitHub account had access to your client's repository.
Ideally your client's account is a GitHub Organisation. That way, an arbitrary number of people can be given permission to access its features. Just add any account as an owner of the organization, or add an account to a team to give access to specific repositories.
If your client's account is not an organisation, you can give yourself access by adding your own account as a collaborator to the repository (in the repository admin settings). That gives you access to the repository from your own account.
If you are trying to use multiple ssh keys to login to different Github accounts depending on which repository you are pushing to, see Multiple GitHub Accounts & SSH Config. However, this is more difficult and is probably unnecessary.