First time using github and want to know command to access a repository - github

I just installed github in ubuntu and i don't know the commands to login with my username and password and command to access a repository and work on it
Thanks

Best way for linux is probably to give github your public key in your settings page, rather than log in as such. Then you can add a github repository to your local repository with git remote add git#github.com:<repopath> and push/pull from it with git push and git pull respectively using SSH for authentication instead of username and password.
If you don't understand any of what I've just said, I'd recommend looking at some tutorials, like this GitHub help article or Try Git.

Related

I cannot upload my iOS project to github

Whenever I try to upload the project to github the following error is coming.
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Please somebody help me. I am new to to github. I cannot understand what is wrong
You are likely trying to connect to GitHub using SSH. Try this link if you want to use ssh. Instead the more preferred method is to push/pull over HTTPS. Try this instead git remote set-url origin https://github.com/User/UserRepo.git. Then if you push, git will ask for your email and password and most probably be successful. Using Https also solves the problem of push/pull behind firewalls
sounds like you haven't properly set up your SSH key for github. The GitHub Documentation should be a good place to start help you properly set up your SSH keys.

Eclipse Git (Egit) not accepting remote username and password

Why doesn't Egit accept username and password when fetching from remote?
These are the steps I follow:
In Git Repositories view I expand Project -> Remotes -> origin
Right click on origin -> fetch
Login mask appears; I insert User and Password
Repeat step 3 other two times
An error message appears: https://companyname.visualstudio.com/.../projectname: not authorized
Credentials are correct and I am authorized because I use them daily with any kind of git interface: TortoiseGit, SmartGit, Git Bash, ...
I did research but didn't find this problem. Also similar questions don't address this problem.
Update: I used a workaround following this guide. I created an access token from the Visual Studio Team Services account and I'm using that as password.
My git installation is using Git Credential Manager (GitHub page, Microsoft guide to GCM) to store credentials, in fact when I ran for the first time git through the interfaces I mentioned above and tried to connect to the Team Services Git repository the Microsoft Account login window popped up and that was it. Also I can tell it from runnig the command git config --list and getting credential.helper=manager.
Eclipse has the Team Explorer Everywhere plug-in installed, so it should interact with Git Credential Manager and accept the Microsoft Account credentials, but it doesn't. So this is still an open issue.
I was facing the same issue
From git side
settings-->developer settings-->Personal access tokens-->generate new token-->copy that token and use that token as password.
The way to fix this is to go to
Window->Preferences->Team->Git
And then change the HTTP client from Apache HTTP to Java Built-in HTTP
The Git clients you mention uses "native" git, and the credentials are provided transparently during the communication with the server.
Eclipse git client (jgit+egit) is full-java based, and unfortunately you can't use native git in Eclipse.
Either your Git server has user+password locally (not so enterprise-ish!) or you could use Kerberos tickets in Eclipse git; but before you run Eclipse you should do a kinit to create a ticket with your user logon, that is accessible from java process. (Normally the ticket is in your user home directory)
Example using kinit:
I m not so sure about the TFS plugin, but maybe in your case it is worth to install it and see if it helps you instead of the embedded egit, see https://msdn.microsoft.com/en-us/library/hh301122(v=vs.120).aspx
I had the same issue, not able to update the username in eclipse pop up while pushing to Git. Irrespective of username, I have provided the generated git credentials password and it worked.
Use personal access token for https. Fine graned tokens are preferred.
Refer. https://cse132.engineering.wustl.edu/files/githubEclipseAuth/githubEclipseAuth.html

Using Team Services online repository without visual studio

I am trying to use a team services account to store other related documents for a project such as some spreadsheets. I want the client to have access to it, but they are not programmers so I am not wanting them to use VS.
The client can access it directly without a problem and can download files, the biggest issue is they will need to be able to upload files as well. Without using a client of some sort they are limited to 10mb or less which won't work for them.
I cannot seem to get github for the desktop to access my online repository unless I first go into VS and clone it.
I am trying to avoid having to walk the client through doing that and would like to be able to use a GUI like github desktop from end to end.
We are all in a Windows environment.
I can create a new repository in github desktop, but cannot seem to figure out how to connect it to my remote (I can't find the URL for the remote anywhere).
I feel I am so close but just missing a couple items, any push would be appreciated.
GitHub Desktop is for GitHub. GitHub is a Git repository hosting service. Not surprisingly, the GitHub tool only works with GitHub.
You can use any general-purpose Git client to interact with VSTS Git repos. SourceTree is good.
You can use some git GUI or git command line to operate local repo.
Git GUI: as Daniel Mann said, you can use soucetree, or tortoiseGit etc.
Git command line:
you can download git here ->
git clone https://account.visualstudio.com/_git/projectname ->
enter email and password to clone ->
git add . (when you add some files) ->
git commit -am 'message'(commit the changes you make) ->
git push(push your commits into VSTS git repo) ->
git pull(pull VSTS git repo changes to localt).
I am just closing this out, thank you to both folks who did answer. I understand that I am using GIT and that GitHub Desktop is for Github. I was looking for the best way to work with a Github repository without using VS and how to access the team services repo for a client of mine. I set him up with Gitkraken which is working. I was never able to figure out how to get Github Desktop to properly clone and push items, but I did not spend a ton of time in it once I used Gitkraken.
Thanks again for taking a swing at it.
I accepted the answer I did because suggesting using the command line at least shows a understanding of my question and what I was looking for.
I know I am late to the game but I can confirm that tortoise git and getext also work fine with VSTS

How do I checkout a GitHub project from command line as a Collaborator?

This seems like a simple question which should have a simple answer...
I'm trying to checkout a GitHub project. The project is owned by someone else, so someone else is the Owner. GitHub Collaborators have read/write access, and I have been granted collaborator rights on the project. Collaborators are slightly different than Contributors, who have simply provided a pull request in the past.
I'm trying to avoid the following because I do not want the source files in "read-only" mode:
git clone https://github.com/user/project.git
I feel like I need to identify myself, and send my password or SSH key. But GitHub's help at Which remote URL should I use? only discusses SSH in the context of a Desktop client. I guess they have an app they want me to use, but I don't really want to use one.
Note: I have information in Git's global config (user.name and user.email), but its not the correct information/credentials for these purposes.
How do I checkout a GitHub based project as a Collaborator from the command line?
Using the the HTTP endpoint instead of the the SSH one.
As an aside, when you say checkout do you mean clone, fork or pull?
for clone it would be similar to this:
git clone https://github.com/user/project.js.git
You will be prompted for your user name and password.

github Committing

I have got github ssh details to get the client project, i never worked on github before. So sorry for this stupid question. I Have ssh keys(public,private which was generated under filezila from my system - ubuntu 10.04) and client has added those keys into his repos. And he has given commiting url from github to my system.
I have installed and made a test project under my account in github with the ubuntu system. But not able to commit the client work.
His url is somthing like this,
ssh://git#domain.com:/home/git/project.git
how can i commit this project files,
i guess i have to add those ssh private,public keys under this github installation but i dont know how to add. Please help me.
Add an SSH key to your github account, see their help page for more information. Make sure to test that it's been set up properly.
Ask your friend to add you as a collaborator to the project: Project page -> Admin -> Collaborators.
Clone the repo at home and have fun committing! The URL will look something like this:
git#github.com:USERNAME/PROJECTNAME.git
So example on linux:
git clone git#github.com:USERNAME/PROJECTNAME.git