RShankar / Senior-Seminar-on-Social-Web

4 stars 8 forks source link

FAQ for the 'Github' group #6

Open RShankar opened 9 years ago

RShankar commented 9 years ago

Please post your Q&A for the 'Github' group here.

gbstoner1 commented 9 years ago

Question from Twitter Group to Git Hub Group. Can you give an example of a Pull API to pull a file from a repository?

intC0der commented 9 years ago

Question from 'Linkedin' to 'GitHub': How safe is GitHub, so I can create a repository and upload my projects?

aasthadave commented 9 years ago

Question from Netflix to Github: What is an example of GitHub APIs helping businesses?

GiBiT commented 9 years ago

Question from Facebook to Github: How can I prevent people from stealing my code if I upload it to Github?

RShankar commented 9 years ago

Question from Dr. Shankar to the 'Github' group: Describe OAuth and its role at Github. Take a simple example and explain. Do not include your personal codes!

MistyM26 commented 9 years ago

Question from 'Amazon Cloud' to 'Github': Many companies that use Github for code storage and development, also use a cloud services provider for hosting their servers and applications and would need their code deployed from Github to these services. What are the actions that can be performed on deployments through Github APIs?

maugus33 commented 9 years ago

Question from 'Paypal' to 'Github': Github allows users to contribute to a project by forking it, applying their own changes, and then sending a pull request to the Repo Master. What are some of the ethics involved with this process? i.e. How would a Repo Master approach a Contributor about changes he/she can not accept?

KotowichS commented 9 years ago

Question from 'NOAA' to 'Github'. What makes Github an easy-to-use collaboration tool?

Jnesbeth commented 9 years ago

Answer from 'Github' to 'Linkedin': At Github, it is set up as an open source tool for other people to use your code that has been posted. Of course, there are also private repositories that are paid for on the main Github site, third party Github sites such as:Gitlab, and Bitbucket that provides private repositories for up to five users. With private repositories, the owner has control over who can see, update, fork, or push to that specific repository when needed. There are more security concerns that have been thought through at Github, and here is more information about how secure their servers and facility is: https://help.github.com/articles/github-security/

other info: Pricing for private repositories: https://github.com/pricing How to make your public repository private: https://help.github.com/articles/making-a-public-repository-private/

Jnesbeth commented 9 years ago

Answer from 'Github' to 'Twitter': There is no way today to pull one file from a repository, you can clone the repository which takes all the files and then you can specify with file would want to work on or use for whatever purpose.

An example of getting a repository shown is used in git bash shell or git shell: You would First clone the repo with the -n option, which suppresses the default checkout of all files:

/git clone -n git://path/to/the_repo.git /

Then check out just the file you want like so: / cd the_repo git checkout HEAD name_of_file /

This gives information of what happens behind the scenes when a repository is cloned:https://developer.github.com/v3/repos/#get

This gives the two ways to clone a reposoitory: https://github.com/blog/1270-easier-builds-and-deployments-using-git-over-https-and-oauth

Jnesbeth commented 9 years ago

Answer from 'Github' to 'Netflix': NASA Jet Propulsion Laboratories use the GitHub API to get information on who is using the system, where to focus evangelism, and who to talk to about specific development projects as they had problems in the past for where they can share their work online to collaborators. Here are some other stories that have been using Github Enterprise: https://enterprise.github.com/stories

Jnesbeth commented 9 years ago

Answer from 'Github' to 'Facebook': Referring back to the answer posted for Linkedin, Github provides private repositories so that that situation will not happen unless the owner decides to share it with the world or with other people.

Here is more information on private repositories and security at Github: Security at servers and facilities: https://help.github.com/articles/github-security/ Pricing for private repositories: https://github.com/pricing How to make your public repository private: https://help.github.com/articles/making-a-public-repository-private/

Jnesbeth commented 9 years ago

Answer from 'Github' to 'NOAA': After the learning curve of using git, there are many benefits to how Git and Github can be used at a company standpoint and to does not take that long and easy to learn. Especially with the features of Github where you can add certain people to your repository to work on various things. The ability for other people to send and receive changes made in the repositories, in other words commits that give everyone a brief line to say what has been changed. Issues are used for bugs that were introduced into the code and for everyone to get a notification to fix it. There are various other features that make Git and Github very easy to use as a collaboration tool as everything will be pretty much in one place and as changes are made everyone are notified and are up-to-date with how to project is progressing. Here is more information about the features of Github: https://github.com/features Also information of how to use these features:http://code.tutsplus.com/articles/team-collaboration-with-github--net-29876 And if you need to learn Git and Github: https://www.udacity.com/course/ud775

Jnesbeth commented 9 years ago

Answer from 'Github' to 'Paypal': With the various open-source projects on Github, the maintainers of any repository reviews each and every pull request that is being made to their repository as they then would decide whether or not to merge that request into the core repository or to decline it. Most of the time these changes that are being made externally are basically bug fixes, adding documentation, adding features, and other unknown fixes to the core repository. However, if the repository is being used by a company, for the most part there are licenses and documentation limiting how much anyone can change the core project externally. In terms of ethics involved, the maintainers of the repository are basically the ethics of what is good or bad when facing external contribution as again they are the ones that review and accept these contributions.

More information on Contributions on repositories on Github: http://dl.acm.org/citation.cfm?id=2597113

Jnesbeth commented 9 years ago

Answer from 'Github' to 'Amazon Cloud': Through the Github deployment API, they can request for a specific reference (Branches) from the repository to be deployed, Github then sends the deployment events that the cloud hosting services can listen for and act on. There are also deployment statuses that allow for external service to mark deployments with a ‘success’, ‘failure’, ‘error’, or ‘pending’ state, which can then be consumed by any system listening for deployment_status events.

More information about deployments: https://developer.github.com/v3/repos/deployments/ How to deliver deployments: https://developer.github.com/guides/delivering-deployments/

Jnesbeth commented 9 years ago

Answer from 'Github' to Dr.Shankar: OAuth2 is a protocol that lets external apps request authorization to private details in a user’s GitHub account without getting their password. It uses tokens, which can be limited to specific types of data, and can be revoked by users at any time. All developers need to register their application before getting started. A registered OAuth application is assigned a unique Client ID and Client Secret. The Client Secret should not be shared. After registering the website that will need the client ID and Client Secret, then users that use your application or website can logging into their github account through that site or app without creating an entirely new account on the third party app or site.

This example is done in C# that was taken from this (http://thechiselgroup.org/2013/11/14/using-oauth-to-authenticate-users-with-github/) website:

This is code on the server side that is making a POST request for the access token that receives a semi-permanent access token for a specific user. The JsonClass and the GithubAccessToken holds the request and response data. After authorizing then the submitted data is then processed to a specific resource.

//Making the POST request so that the app can communicate with github HttpWebRequest webReq = (HttpWebRequest)WebRequest.Create("https://github.com/login/oauth/access_token"); webReq.ContentType = "application/json"; webReq.Method = "POST"; using (StreamWriter streamWriter = new StreamWriter(webReq.GetRequestStream())) { JavaScriptSerializer ser = new JavaScriptSerializer(); //Holds the request data for the app var data = new jsonClass() { client_id = (the client id), state = (the state, if provided) code = (the code, from a GET request before) client_secret = (the client secret), }; var json = ser.Serialize(data); streamWriter.Write(json); } //Read the response from Github HttpWebResponse webResponse = (HttpWebResponse)webReq.GetResponse(); StreamReader streamReader = new StreamReader(webResponse.GetResponseStream()); var responseText = streamReader.ReadToEnd(); streamReader.Close(); JavaScriptSerializer deserializer = new JavaScriptSerializer(); var deData = (GitHubAccessToken)deserializer.Deserialize(responseText);

Bainshinds commented 9 years ago

Question from 'Amazon Retail' to 'Github': Who do you believe is Github's main competitor and do Github have any advantages have over them.

Jnesbeth commented 9 years ago

Answer to 'Amazon Retail' from 'Github': Github has many competitors in providing the same kind of service that Github presents to society. The one main advantage that Github has over all other service providers is that it meets software companies requirements, a bit of a learning curve to use, but still very user-friendly after learning how to use it, very easy to set up, very fast in updating the entire team if changes are made in repositories, there are very good support teams, and provides information about the software teams productiveness. The only disadvantage that they have however is the fact that the private repositories are not free.

Some of Github Competitors: https://www.g2crowd.com/products/github/competitors/alternatives http://www.getapp.com/it-management-software/a/github/alternatives/