how to upload your local repo to a designated remote repo in Github when you have two Github accounts and one of them is set as default? - github

First of all, I tried to edit SSH/config file by adding a newly generated key, its hostname and so forth. Didn't work. Every time I tried to upload a repo to my personal github account, git would try to upload it to my work github account. My question is really, should I modify SSH/config or .git/config, are those two different? For the record, these are the sources of inspiration I am refering to here. (1)http://guides.beanstalkapp.com/version-control/git-on-mac.html
(2)https://www.youtube.com/watch?v=fnSRBRiQIU8
neither of them works. In addition, as I opened the SSH/config file, there is no trace of the SSH keys which is connected to my work github account, which I've been using for a while. I literally started using github actively two and a half months ago, and a colleague helped me set up everything. I am using a mac. Where is my work SSH keys stored?
Thank you very much! All of your advice would be deeply appreciated.

Related

Clone Git repository with personal access token

I just created a new Github repository, and as I was about to clone it to start pushing files I realized I no longer managed to pass the authentication step. I have tried pretty much every combination of solutions I could find on the Internet, starting with how I used to do it (git clone https://<PAT>#github.com/<username>/<repo name>), and nothing seems to work. I also tried the <username>:<PAT>#github.com or oauth2:<PAT>#github.com variants among other things. When trying to push, I either end up having to enter a password that's no longer supported and inevitably fails, or I get straight up told my username or password are invalid. I also regenerated the PAT so it's not an expiration issue.
I know this is quite similar to other questions on this site, but none of their answers worked for me. Did Git change their authentication system again recently?

github desktop not allowing sync to remote repository - no access or repo deleted or renamed

We are having an issue with syncing on Github Desktop.
We have a team of 4 members and a company setup in Github.
One of our members can sync the repos he has already worked on before but when I create a new repo for our company, so all members can access it, I can sync but one of the members who is working on the project keeps getting an error
https://github.com/companyname/reponame.git/ doesn't seem to exist any more.
You may not have access, or it may have been deleted or renamed
I have tried to research this but not been able to get any direction, where to go?
Thank you everyone for posting and helping.
I have found the solution and it's a big oversight on my part.. Remember when you create a Repo with team member access, you MUST give then access to WRITE as Git sets default to READ only. When syncing, git desktop does not make it clear that its a permissions issue..
Here is where the READ/WRITE permissions are located on the Github site once you are logged in.
Thank you all.
Double-check that:
the right account for that user has been added as a collaborator for your repo (or your GitHub organisation).
said user is not using a credential helper which would have cached another GitHub account
git config credential.helper

GitHub 'your credentials may be out of date' can't clone

I have tried logging out and in, changing password and non work.
I also downloaded the project as zip and put it in the folder. But I can't 'find' it on github client for windows and I cannot clone it then it tells me the project already exist. But I can't open the repository on github for windows. I have deleted Github for windows and re-installed it. I've removed the SSH on github.com so it would make new keys. None work. Any suggestions?
I am getting this error:
http://snag.gy/eHlqj.jpg
So no specific reason at all but;
It was almost 5 months that I was part of this private project. 5 of us are committing almost every day for the past 5 months. Only I had this problem so far.
What helped:
Uninstall github
use something like ccleaner to clean your pc and registry
remove %AppData%\GitHub manually
remove %LocalAppData%\GitHub manually
restart
go to www.github.com in your account and remove the SSH key's.
install github client and login
done, it should work now
It seems that this is a problem of web credentials, have you tried with another browser? or to clear the cache of Chrome?

How to undo the sync to get the files in local repo back?

I'm very new to github and I started using it a few weeks ago for my uni group project.
The problem that I'm having is:
There is a remote repo on github where everyone in the group is using.
I do have a local repo on my laptop, where I've worked my part of the project.
I recently committed and synced the updates that I made to github using desktop app for mac.
I got a few errors and the sync failed.
After that when I looked at the files that I have locally, they got overwritten by the ones from the git(non-updated version) and all of my work are gone.
Can you please help me on what I should do to receive the files that I had locally? Is there any way that I can undo that last sync. I found a few suggestions online, but since I'm not sure which one to use, I don't really want to mess up the files anymore.
Thanks
(Nearly) All changes made to git repositories can be undo. We don't know the commands you entered but enter it at Google for a specific solution.
You proberly have to use something like:
$git rebase

Why my blog with Jekyll Bootstrap not update?

I push it several hours ago, but my blog didn't changed yet.
Does github.com server delay or my personal reason? It test will in my computer with localhost:4000.
PS: So, I delete the repo and recreate the repo in github, but 404 always:-(
Are you accessing the page via username.github.com, or at a personal domain?
If it's at a personal domain, make sure you have a CNAME file (with that name) in the foot of the repo. It should just contain this: www.myfancydomain.com. Check your DNS settings as well.
If you're using any plugins, GitHub won't run them during generation. That could be causing a problem?
Also make sure the pushed site is in the gh-pages branch. Always good to check the basics. :)