0

I read the "How to Create a CocoaPod in Swift" and I got stuck when I tried to push to git:

cd ~/Documents/Libraries/RWPickFlavor  
git init  
git add .  
git commit -m "Initial commit"  
git tag 0.1.0  
git remote add origin [Your RWPickFlavor Git URL]  
git push -u origin master --tags  

when I execute the last instruction,the terminal outputs that I don't handle protocol '[https'

Note: My git version is 2.3.2,and Pod version is 0.38.0

2
  • 1
    [Your RWPickFlavor Git URL] in tutorial is a placeholder, and you should use your real git repo address in its place. Commented Jul 23, 2015 at 15:33
  • I have already used my git URL,but it still tell me the same error Commented Jul 24, 2015 at 7:52

2 Answers 2

1

Are you sure you set up your remote URL correctly? You can check it with this command:

git remove -v

I suspect yours has square brackets in it, like this:

origin  [https://github.com/...git] (fetch)
origin  [https://github.com/...git] (push)

It should look something like this:

origin  https://github.com/...git (fetch)
origin  https://github.com/...git (push)
Sign up to request clarification or add additional context in comments.

5 Comments

origin [https://github.com/KimLee2015/LeePods_oc.git] (fetch) origin [https://github.com/KimLee2015/LeePods_oc.git] (push) This is what the terminal output,but I don't think it is wrong
There should be no square brackets. You can fix it with git remote set-url origin https://github.com/KimLee2015/LeePods_oc.git
git remote set-url origin https://github.com/KimLee2015/LeePods_oc.git fatal: Not a git repository (or any of the parent directories): .git
You are either not in the directory of your project or you delete the .git folder
I have already finished [raywenderlich.com/99386/create-cocoapod-swift] MyStoreSearch is my Swift project,and the Pods contain SDWebImage.I also create the Bridging-Header.h,when input '#import "UIImageView+WebCache.h"' Xcode output that UIImageView+WebCache.h file not found
0

You can download the GitHub App and push to repository without using termal/commandline

aslong as you have ticked git repo when you created the xcode project

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.