Link private github repository to potential employer - github

I have some private github repos that contains the work that I am most proud of. I would like potential employers to see this code. Is it possible for me to give them a link to the private repository so they can view my work?

You could either:
create a private repo in bitbucket and push your project there, then send an invitation to employers' emails
add potential employers as collaborators to your private Github repo.
On the main repo's page, go to the "Settings" tab
On the nav links to the right, "Collaborators"
I'd recommend against zipping the project and sending them the whole thing, as they'd either not see the git history, or see your entire git configuration, depending on how you zip the folder... And I think seeing how a developer works with git is important in addition to seeing the code itself...

There are few option for you:
If you have private repositary on your machine, then public into bitbucket or github and making private repo.
If you have private repositary online you can invite them to the repositary and give them privilages that you want to.
Make latest backup of your repositary and send it to them.
Hope it helps.

Related

how to allow 3rd party to create repo (repo transfer) in our Org without let them see our private repo?

We have hired a 3rd party to work on a project, we started by not creating any Repo on our Github, but they started with their Repo. So now it's time to transfer the repo. However, in order to transfer the repo, the developer is asking permission to create a Repo in our Org... but as far as I know, I can only invite him first as a collaborator, a member, before he can create any private repo in our Org... that means he can see our other repo...
I couldn't find any good answer online, please help. Thanks!
Have you tried using Github's Organization features? You can create an organization with your team members in it, and control who has access to what.
Here's a Github page that explains a bit more about how it works.
Do not add them as a member to your Org! (this is the only option today from Github, nor owners...of course). If you do so, this will give your external developer access to all of your repos.
The only way I found you can safely invite an external user is to create a Repo first, then add them in that Repo. By doing that, they will be invited only to that repo, and have no access to the others.
This is my workaround. If you have a better solution, please do comment. I am curious how the "transfer" feature works.

Cannot enable forking on github repo

I have a private repo. I noticed I cannot fork it. I cannot find any information that says I shouldn't be able to. When I go to Options the ability to fix this is disabled. I am guessing you need to pay or something which is fine, but it doesn't say that anywhere...
Cannot click!
I think you are talking about your organisation's private repo, right? As I didn't find this checkbox for personal private repositories.
If so, then you need to:
go to your organisation's settings, Member privileges, and check "Allow forking of private repositories" there.
go to your repo and you'll see "Allow forking" will be automatically checked after doing step 1, like this.
The process is also described here:
https://docs.github.com/en/organizations/managing-organization-settings/managing-the-forking-policy-for-your-organization
As of 1/9/2022, I had to update "Member Privileges" in the Organization first:
And then, in the repository it seemed to automatically allow forking. Just note that you might want to update any other repository that you shouldn't be forked.
References:
https://docs.github.com/en/organizations/managing-access-to-your-organizations-repositories/setting-base-permissions-for-an-organization
https://github.community/t/private-repositories-option-grayed-out-under-member-privileges-in-my-organization/2029/6

How to prevent pushes to a private repository in Github

We have a repository in GitHub. We want a group of developers to be able to view and fork this repository. But we'd like to prevent them from committing to our branches. Instead, we want this group of developers to fork the repo and create pull requests to contribute. Is there any way to achieve this in GitHub?
Access control is no longer available for private repositories. Both read and write access is given to the collaborators.
If a collaborator will have only read access to a repository, you must create an organization.
You need to add collaborator to your repository and give them just read access, look following article:
https://help.github.com/articles/adding-collaborators-to-a-personal-repository/

Issues if migrating a repository to a Github organisation then forking the repo?

I have a Github repository, lets call it:
http://github.com/LegoStormtroopr/ExampleRepository
I want to hand ownership of this repository over to an Organisation to get:
http://github.com/MyCoolOrg/ExampleRepository
But, I want to keep working on the code on my own fork. If I forked this code, I'd once again have a repository with the address:
http://github.com/LegoStormtroopr/ExampleRepository
In effect, I'd move the upstream to the organisation, make forks in a local github fork, and then be able to issue pull requests to the organisation.
I'd like to do this with the least hassle and breakages, and the documentation on what happens after a repository is handed over is a little hazy.
Are there any serious issues that will happen as a result of shifting the repository like this? Will things break because a repository that was there disappeared for a short time?
So having just given this a shot, it appears there are no issues when doing this. However a few things to note:
The organisation cannot have a previous fork of the repository. This prevents it from being able to take ownership.
If you transfer the repository to the organisation, and then fork this into your own account, any working copies of this don't need to be updated, however changes you make will be pushed into your repository, not the organisations.
You may need to reconfigure third-party applications (like Travis-CI and Coveralls) to work with the new organisation, but this is straight forward:
From your account, go to settings and select Applications:
Find the application you need to reconnect (for example Travis-CI) and click View:
Next to each orgnaisation there will be a button titled Grant (not shown because I've already clicked it):
To get Coveralls working properly, in addition to the above, you also need to:
Set your visibility in the organisation to Public:
Refresh the list of repositories in Coveralls (ignore the button name, it syncs public and private repositories):
Lastly, to retain your coverage history, in Coveralls in your old repository select "Change source" and in the list select the corresponding repository in your new organisation.
And now your organisation is all set!

Make private repo contribution history public

I would like to show a client my contribution history towards a project, without making the repo public. Is there a way to do this through github (eg: not taking screenshots of everything).
Ideally they could see at least the number of contributions towards the project; it would be great if they could also see the graph features (punch card, timeline, etc.).
Is this possible?
I created a script that solves this problem:
https://github.com/ebrian/gitdummy
It will transfer all of your commit messages and dates for a given email address out of an existing repo and into a dummy repo that you can then push up to your GitHub account. It won't transfer source code, project names, or project team members' commits.
Enjoy.
EDIT
You can now show private contributions on your GitHub profile page.
https://help.github.com/articles/viewing-contributions-on-your-profile-page/
No, this is not supported through the GitHub website, unless you want to create an "organization" and give the client read-only access to the whole repo.
Clone the repo locally and use the git log command to dump the project history to a text file. You can then give the client this text file. This won't give you GitHub's visualizations, but you could make some of your own in Excel or some other program.
It's possible now!
Go to your profile page
Under "Contributions settings", open the dropdown
Choose "Public and private contributions"