Mac Client & Github Setup

#1

Folks I using Atom and trying to setup git/github. I have found conflicting techniques online through searches and little to nothing in the documentation. I am hoping that I can find some support here. The application and OS X are all updated to current versions.

I am running the Mac client version and have been able to get my auth token successfully, and when I configure Atom to work with Git it is not selecting the ‘master’ as the default. Atom keeps thinking I need to create one which for the initial build out of the integration and use of Atom seems incorrect. Especially all the evidence I have found and researched shows that this selection just happens behind the scenes.

I am looking for some support or a current set of instructions to follow with the hope that it will resolve my issue.

Thank you

0 Likes

#2

You’re getting a couple of different features confused. The auth token has nothing to do with Atom’s git integration. It’s specifically for accessing the GitHub API so that the github package can display pull requests. You do not need a token to interact with your repositories and Atom requires zero setup to clone, push, and pull. All you need to do is have the project folder open in Atom and have your git credentials set.

Do you have a cloned repository with valid remotes on your computer already, do you have a repo online that you need to clone, or are you trying to set up a new repo from scratch? Have you set your git credentials?

0 Likes

#3

All that to tell me I am confused. I would of rather heard how to set these credentials or a link to the docs on how to do so. I find very little next steps in your post and honestly that is why I am here.

Can you please share specifics and point me to what I have missed?

0 Likes

#4

All of the git documentation is on its web site. I can’t give you specifics unless you answer my questions and give me a precise idea of what you understand and what you need to know.

The easiest way to get started is to download git from that web site. Yes, you can do a lot in Atom, but familiarity with the command line is still valuable for using git, since Atom doesn’t integrate every feature.

0 Likes

#5

Okay, Damned let me start from the top. I have been tasked to figure out how to use atom on MACs with guthub by my instructor so she can make this part of her Pythion class. She does not want the git client she wants one tool - Atom. So I started with the documentation, the atom flight manual here:

https://flight-manual.atom.io/using-atom/sections/github-package/

This how is not a ‘this is how to set things up’ rather its a hey here are the features within atom/github interaction. Okay that is fine, but where is the ‘how to’. So I googled around and everything I found was very outdated and did not reveal anything new on how to make git and atom work together.

Literally, that is what i have been asked to figure out, again how to get atom and git to work together. It was stated that ‘it just works’ well it doesn’t. I have installed Atom I have a GitHub account but they are not talking and I can’t figure out why. So I came to this forum.

All right hopefully I have cleared up the goal of this endeavor for you. Now to your questions regarding the repositories. I have been trying all sorts of things and think that I tried each scenario you outlined. However, given the previously stated goal here the most correct would we are wanting to set up repositories from scratch.

Yes, our goal as a new org is to learn git cli for the reasons you stated, however, we are trying to keep the moving parts to a minimum and are surprised to not find any ‘how to’ documentation. Now if you come back and say well to do this you need to install git that is just fine as well, just adding more complexity is not the out of the box goal.

As to the question of what we understand, honestly, we are new to this. The team is network engineers that are actively learning python to develop automation scripts as part of a larger effort that is not important to this discussion.

Here is hoping this post met your requirements to provide some guidance and fingers crossed that you have time to answer us sooner rather than later. Thank you in advance.

0 Likes

#6

That does give me a much better place to start, thank you.

The “how to set things up” section of that document is called “Clone repositories”. That’s all you need to do to start interacting with git through Atom. The local repo will be created in the default project directory you’ve set in Atom’s Settings and unless something goes wrong with the software, it will “just work”. If it doesn’t, report back and we can try to find the bug, but Atom comes with git access built into the core API, even though the github package is required for cloning and other operations.

To start a new repository, the best way as novice git users is to open it via the GitHub site and use the clone feature to create your local repo. If you have an initialized git folder with code, and especially if you’ve tried to make commits and want to keep them, then you may need to use the CLI to fix the remotes so that your repository points at the one you have on GitHub’s servers, or you can clone a completely blank repo and paste in your new files. Commits and pushes can all be made inside Atom without installing anything extra, but for advanced usage you might want the git-plus package.

Atom and GitHub only talk to one another under specific circumstances: when you push to or pull from a repo stored on GitHub’s servers, or when you have a repo stored on GitHub that has pull requests. The GitHub auth token is used only for this latter interaction. Before you can push to your repo, you need to tell git (any instance of git, because they’ll all store the credentials in the same location on your computer, so there’s no need for worry about compatibility between Atom and CLI git) what your GitHub username and password are. If you’re doing it with the github package, Atom will simply ask you. If you’re using the CLI, it will ask you. GitHub’s site has additional relevant documentation for different OSes and authentication methods, in case your team wants to use SSH. (Following the instructions in those articles, and instructions from people like me on forums like this, is another reason to have the CLI available to you even if you never use it personally.)

I think the biggest issue here is that Atom was written by people who work at GitHub, many of whom were using git for years before that company ever existed, and the heavy bias in the community toward people whose workflows are saturated with git and git-fluent colleagues may have obscured the fact that “clone repository” doesn’t sound like a perfectly clear starting point unless you have already absorbed the slightly poetic vocabulary crafted by Linus Torvalds.

0 Likes

#7

Thank you and in the Clone Repo section where do you run the command"

Clone repositories

To clone a repository, run the GitHub: Clone command. In the dialog paste a URL of a repository and click “Clone”. A new project will get added to the Tree View.

Every place I tried to run it failed.

0 Likes

#8

Instructions on how to run a command by name are in the section of the Flight Manual called “Atom Basics”. On subjects like that, the documentation is far more useful than me telling you directly because the keybindings are different on Mac and the Flight Manual automatically adjusts to your OS.

The Command Palette uses fuzzy logic to filter through all the commands in the registry, so start typing wherever in the command string is most unique and memorable (“open” and “git” are likely to return many results whereas “clone” is not, for instance) and you’ll get to the one you want.

0 Likes

#9

Thank you DamnedScholar your guidance got me where I wanted to be. I agree with your observations about poetic language, fortunately, I am not a poet. I gathered the steps together perhaps someone else searching for them or the Atom documentation team can use the following.

While Atom has native support for GitHub there are a couple of steps needed to activate it. First, there are a few places to begin if you are new to Atom:

[Instructions on how to run a command by name]
(https://flight-manual.atom.io/getting-started/sections/atom-basics/#command-palette) are in the section of the Flight Manual called “Atom Basics”. On subjects like that, the documentation is useful as the Flight Manual automatically adjusts to your OS, pretty cool right.

  1. Have an account setup on GitHub with a repository created.
  2. in Atom, the Command Palette. If you press Cmd+Shift+P while focused in an editor pane, the command palette will pop up.
  3. To clone a repository, run the GitHub: Clone command. In the dialog paste a URL of a repository and click “Clone”. A new project will get added to the Tree View.

The auth token has nothing to do with Atom’s git integration. It’s specifically for accessing the GitHub API so that the github package can display pull requests. You do not need a token to interact with your repositories

To start a new repository, the best way as novice git users is to open it via the GitHub site and use the clone feature to create your local repo. If you have an initialized git folder with code, and especially if you’ve tried to make commits and want to keep them, then you may need to use the CLI to fix the remotes so that your repository points at the one you have on GitHub’s servers, or you can clone a completely blank repo and paste in your new files. Commits and pushes can all be made inside Atom without installing anything extra, but for advanced usage you might want the git-plus package.

Atom and GitHub only talk to one another under specific circumstances: when you push to or pull from a repo stored on GitHub’s servers, or when you have a repo stored on GitHub that has pull requests. The GitHub auth token is used only for this latter interaction. Before you can push to your repo, you need to tell git (any instance of git, because they’ll all store the credentials in the same location on your computer, so there’s no need for worry about compatibility between Atom and CLI git) what your GitHub username and password are. If you’re doing it with the github package, Atom will simply [ask you] If you’re using the CLI, it will ask you. GitHub’s site has [additional relevant documentation]for different OSes and authentication methods, in case your team wants to use SSH.

0 Likes