Git push failed when I updated the cocoaPods - ios

In order to fit iOS 10,I have to update these 3-part in cocoaPods,so I had updated the cocoaPods to it's newest version.APP works fine,but when I use git push, the terminal require me to input username and password for github,however,the terminal showed:
fatal: Authentication failed for 'https://github.com/CocoaPods/Specs.git/'.
I am sure the username and password I put into is right.
Before I asked this question here I had ask for help on Google and find a solution:Pull first,then push.
But the embarrassing thing is that I had commit my code.That is to say,if I use git pull I will lose all my work today,that's terrible,so I wonder if there any better way to solve it.
When I hit git remote -v in terminal there showed something interesting:
origin https://github.com/CocoaPods/Specs.git (fetch)
origin https://github.com/CocoaPods/Specs.git (push)
I am surprised about how cocoaPods changed my project's remote url?

Finally I use git remote set-url origin xxx solve this problem.

Related

Github pulling does not work in - Rails 5

I'm trying to pull last commit that I made on github, and though I get no errors, I see no changes in the code. I messed up my schema file, but after I pull the code it does not change at all.
I searched here on stack and the solution that worked for others didn't work for me, and this is also my first time that I'm pulling code from github, so I could've probably done something wrong.
I used this code:
git fetch origin controller-generator
git git reset --hard FETCH_HEAD
This is what I get as the output
HEAD is now at 1fb8c97 Integrated friendly routes gem
'Integrated friendly routes gem' is my last commit that I want to pull, but nothing changes. I don't know if I need one more step or whatever it goes with it.
This is what I have in commit db file
And when I pull this, I get this
The last one should not be there.
This is output
equalsign:~/workspace/BlogAndPort/db/migrate (controller-generator) $ git reset --hard 1fb8c97d64f389904b3048fb2850fcfd8425cd36
HEAD is now at 1fb8c97 Integrated friendly routes gem
equalsign:~/workspace/BlogAndPort/db/migrate (controller-generator) $ git push -f origin HEAD
Warning: Permanently added 'github.com,192.30.253.113' (RSA) to the list of known hosts.
Everything up-to-date
The problem is still the same as shown in the pictures. db files did not change
If I understood, you are asking to reset your local/master with origin/master.
$ git fetch
$ git reset --hard origin/master
You can back (hard reset) to a commit that was working for you.
$ git reflog # copy the commit-sha where you want to back/reset
$ git reset --hard <commit-sha> # reset to the commit
Now, if all things are ok. Then Force (-f) Push to remote.
$ git push -f origin HEAD # update remote branch

Xcode 7 GM can not authenticate git repository

I could commit to this repository without problem with Xcode 6. git still works fine in terminal, i can commit both locally and to the remote. In Xcode 7, I can commit locally but not remotely. it says authentication fails and it is impossible to reset the username. (it's greyed out). I have the proper username in my local git config file. I've also tried to create a new account but I end up with the same problem of not being able to enter the userName.
my git config --local --list
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
core.ignorecase=true
core.precomposeunicode=true
remote.origin.url=git#bitbucket.org:myUserName/myProject.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
branch.failedTryToRename.remote=origin
branch.failedTryToRename.merge=refs/heads/master
branch.master.remote=origin
branch.master.merge=refs/heads/master
branch.master1.remote=origin
branch.master1.merge=refs/heads/master
user.name=myUserName
user.email=myUserName#gmail.com
The problem is that you are using the SSH remote URL:
remote.origin.url=git#bitbucket.org:myUserName/myProject.git
You will need to switch to the HTTPS remote URL.
git remote set-url origin https://bitbucket.org/myUserName/myProject.git
Alternatively, just give up. Stop trying to use Xcode's internal git management. (It's pretty terrible, so no harm done.) If you want a GUI, use SourceTree; it's from the same people who give you Bitbucket and works with it beautifully.

Installing Erlang/OTP 17.5 on OSX

The official install instructions say:
If you want to build the wx application, you will need to get
wxWidgets-3.0 (wxWidgets-3.0.0.tar.bz2 from
http://sourceforge.net/projects/wxwindows/files/3.0.0/) or get it from
github with bug fixes:
$ git clone --branch WX_3_0_branch git#github.com:wxWidgets/wxWidgets.git
Who wouldn't want bug fixes:
$ git clone --branch WX_3_0_branch git#github.com:wxWidgets/wxWidgets.git
Cloning into 'wxWidgets'...
fatal: Remote branch WX_3_0_branch not found in upstream origin
Does anyone know where the bug fix version is located?
Response to comment:
With all caps, I get:
$ git clone --branch WX_3_0_BRANCH git#github.com:wxWidgets/wxWidgets.git
Cloning into 'wxWidgets'...
ssh_exchange_identification: read: Connection reset by peer
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
For future searchers: in order to use github commands like above, you need to setup ssh keys for your computer. I had already done that, but for some reason it didn't work a few hours later. Firewall problems at my new location? I don't know. I moved to a different location/server from where I was getting the Connection reset by peer error, and then I created a new ssh key, and I was able to download and install wxWidgets. The git clone command just downloads the source, so you probably want to be at the ~/Downloads prompt when you issue that command. The Erlang install directions tell you how to install wxWidgets.
The branch in question is named WX_3_0_BRANCH — all uppercase.

Git push origin master fatal error: Permission to railstutorial/first_app.git denied

I'm trying to git push origin master using Michael Hartl's rails tutorials (first_app), but i'm getting this problem:
[first_app]$git push origin master
ERROR: Permission to railstutorial/first_app.git denied to tomkim
fatal: The remote end hung up unexpectedly
I've re-entered an SSH key, but that's not it. I've never had this problem before, but now I am.
Help's greatly appreciated.
You need to add your own repo as the remote (of course you need to create a first_app repo on Github first):
$ git remote rm origin
$ git remote add origin git#github.com:tomkim/first_app.git
$ git push -u origin master
And tomkim is your github account name, right? If not, change it to yours.
I was able to figure this out. I noticed that the origin was showing "railstutorial/first_app.git", when that it should've been tomkim310/first_app.git. The problem to begin with was follow Hartl's tutorial, I was just typing as he was going. Simply doing a new "git remote add origin git#github.com:tomkim310/first_app.git" does not do the trick.
I verified this by typing in: git remote -v which gave origin git#github.com:railstutorial/first_app.git. To change it, i typed: git config remote.origin.url git#github.com:tomkim310/first_app.git.
This then did the trick and git push origin master worked.

Codaset: can't do initial push!

For people who use Codaset...
I can't push! :( My application is recently added, and this is what git push origin yields:
error: error setting certificate verify locations:
CAfile: /bin/curl-ca-bundle.crt
CApath: none
while accessing https://codaset.com/daze/rampage.git/info/refs
fatal: HTTP request failed
I already added the origin as my remote, so git remote -v yields:
origin https://codaset.com/daze/rampage.git (fetch)
origin https://codaset.com/daze/rampage.git (push)
My SSH key is already uploaded, too. Help?
Also...how come there's no clear link to http://codaset.com/account/ssh_keys to view my ssh keys? Not too intuitive a design...
Hmmm should I just use GitHub instead? It may be easier...what's better, codaset or github?
I think the best place to post this is at http://codaset.com, which it looks like you already have.
To summarise, you are trying to push over Smart-HTTPS but are doing so with a version of Git that is older than 1.6.6. Smart-HTTPS support was added in 1.6.6. So upgrade to the latest Git, and all should work for you.

Resources