How to share Github Pages via link-only option? - github

I am trying to share my Github Pages only via link (if possible, keeping my repo private), just like the link-only share option of Google Drive. Specifically, only those with the URL can access the github.io website that I made, while the repo (the github.com website) is preferably not accessible to anyone. May I ask if it's possible, even via third-party tools?

if you share any link from a private repository, you will get an error 404.
Something you can do to test this behavior... is open a chrome tab in incognito mode and paste your link ... there you will see the error.
If you want to share any link in one of your repositories, it must be Public.
If there is another possibility, please let someone tell us how to do it. regards

In general, I don't know if there's a third-party tool to do the work, but it's easy to make it by hand, provides that you're not creating a lot of such pages.
First, is it possible to make a public GitHub Pages based on private repository?
Yes. Just create a private repository, head to Settings >> Options, find the section called "GitHub Pages" and set the source branch. This process is just the same as creating any GitHub pages.
P.S. you SHOULD see the message
Caution: This repository is private but the published site will be public.
This states exactly what you want.
only those with the URL can access the github.io website
Well, just make the URL difficult to guess.
For example, named the repository as a random string "uk5KKR".
However, this will likely mess up the repositories in your profile, soon after you'll be difficult to find the correct repository that you need now.
Instead, you can named name in this way: "githubpage_uk5KKR".
For other people, it's difficult to find this page when they are not provided the URL. And for you, just search "githubpage" in your profile and this repository should appear.
Here's a few notes:
You should adjust the length of the random string according to how secure you need.
It's also possible to make a quarantine area by the path name in a repository. For example, create paths "n2jnHG" and "4xSN2g" in the same repository of GitHub page, then the contents in these two paths could be shared with different people.
Finally, note that if anyone failed to keep the URL secret, the whole page is not secret anymore. It could even become an entry in Google search result.

Related

Custom domain on GitHub Pages not working properly

I purchased a domain on NameCheap, and followed a step-by-step guide to configure it with GitHub Pages (I'm pretty new to all of this).
But my GitHub page is not using the custom domain even after configured
The first step was to configure the 4 A records and the CNAME with my username in github:
After that I went to the repository that has my username and set up GitHub Pages, and then added my custom domain:
So far, everything worked perfectly, he re-deployed and added a CNAME file to the master branch
But when I try to use GitHub Pages in other repositories, it still gets the old domain (username.github.io)
What I really wanted was for this project to be in custom.domain/project-name
Any light on what I'm doing wrong?
I didn't find anything different from what I did looking at the official documentation
**Of course I didn't use these names from the images, I just removed the original name.

Is it possible to put a comment on a code in github public repository

A public Github repository belongs to one of my fellow developers. I need to put comments on certain areas of code. I have done this previously using pull requests
Is there a way to do it without opening a pull request and directly commenting on the code?
I don't see an option as of now. Not sure if the other developer needs to add me or grant certain permissions

Does changing your GitHub username leave any leftover references to the old name?

I would like to change the username of an old GitHub account which I once used rather than making a brand new one. I don't want to do this unless it leaves no remnants of the old account name. Especially on the profile page.
there are some leftovers, as described here. The two main drawbacks are below.
You will need to manually change your repository references.
You will need to change the links to your GitHub profile in social media (or any other site).

How to submit website feedback to GitHub?

I want to make a page on my website containing the information form for the bug they faced while using the website and web application.
Then I want to show those feedback to my private GitHub repository, so that I can keep track of all the bugs and work on fixing them.
Is there any GitHub API for this purpose?
Using the GitHub API (like suggested in the other answer) is a possible solution, but requires you to implement the UI by yourself, call the API with proper authentication etc. etc.
If you want a simpler solution with less work for you, you could point your users directly from your website to your GitHub issue tracker.
Unfortunately, GitHub doesn't support private repositories with public issues. Their official solution for this problem is to
create a second (public) repo and use this just to host the public issues.
If changing your hosting provider is an option for you, you could migrate your project to Bitbucket.
They offer unlimited private repos for free if you have max. five users, and it's possible to have a private repo with a public issue tracker.
Quote from the last link:
Users with administrative rights on a repository can set a Bitbucket
Cloud issue tracker as private or public. When your tracker is
public, anyone can view, create, and comment on issues it contains.
This includes people who land on the website but who do not have a
Bitbucket account. The system asks these users to verify they are
people with a CAPTCHA.
You can set your Bitbucket repository, wiki,
and issue tracker as private or public, independently of each other.
For example, you can hide your code from the world by setting your
repository as private, but let people see your documentation and
issues by marking your wiki and issue tracker as public. Or you could
set your repository and wiki as public but keep your issue tracker
private. You can change any of these settings from private to public,
or public to private, at any time.
GitHub does have an API and one if its end-points is for creating bugs:
https://developer.github.com/v3/issues/
Well, https://github.com/tan-tan-kanarek/github-php-client this worked like a charm for me. In my scenario, I was working in phalcon framework and I used this API to submit issue to a private GitHub repository.
Authentication is pretty simple in this API .

About creating a new project in GitHub

Kinda new to GitHub, I want to create a repository for my open-source project.
If my username is Bob, the link would be like https://github.com/bob/my-project
And you could visit my personal profile at https://github.com/bob
However, I have seen projects like this: https://github.com/ruby/ruby
My guess was: well, it means that there is some user called "ruby" who has a repository called "ruby".
So naturally, I could see this "ruby" user's personal profile at https://github.com/ruby... But you can tell that's NOT a normal profile. Instead, it is some sort of list for related repositories.
Well then, what is that? Am I supposed to do the same thing?
That is a GitHub organization.
It is an organisation. https://github.com/blog/674-introducing-organizations
On Github you can create organisations to organize members and repositories.