SourceTree github repo not valid url - url

When I install SourceTree on my OSX, setup a Github account via ssh, and then copy/paste Github url/clone, It always says "Not a valid sourcepath/URL" even though the url is valid.
I have searched the web for the same issues, and found some interesting solutions, but non of them worked in my case. I have tried removing all of SourceTree's settings and completely uninstall the APP, but same stuff is happening. Also tried removing my account, removing ssh key etc. (I have git installed).
All of my connected repositories is shown under the tab remote, but I just can't clone anything.
The Github repo url is: https://github.com/myacc/teststuff.git
Any ideas what might be wrong? :/

First, if you are talking about ssh keys, the url to use should be an ssh one:
git#github.com:myacc/teststuff.git
Second, since I don't see that repo on your account, it could be a private repo.
Make sure yu have enabled Git on SourceTree (I prefer using the system Git, meaning a Git I have installed myself)

Related

How is electron-updater able to find my repository?

I have a repository that utilizes electron-updater for auto update. The weird thing is, it has no any code whatsoever pointing where the release updates are stored (I store it in GitHub releases), but somehow the autoUpdater.checkForUpdatesAndNotify() still works. There is github remote origin but I doubt it's being used by electron-updater to find the repository. I don't use any GitHub token either.
The way I release update:
Increase the version in package.json
Run electron-builder, producing .AppImage
Create new release draft in my repository's GitHub releases
Upload the .AppImage file to the draft's assets and modify the draft's tag
Download the previous release, and then open it
Voila! The update works. But how?
It's worth mentioning that if latest-linux.yml is missing from the latest release's asset, it will throw 404 error and refuse to update despite knowing the latest version's tag.
Here's the repository I'm talking about: https://github.com/SnekNOTSnake/fresh-update/releases
Also, is this how normal people release their electron app? I tried the electron-builder --publish way, but it's troublesome compared to the manual steps above.
Thanks to Caramiriel in the comment section above for the enlightenment.
How electron-updater knows where to find the repository is from resources/app-update.yml inside the produced .AppImage file.
The app-update.yml file is produced by electron-builder using the information from git remote get-url origin (if available).
I proved it by changing the origin's url to https://github.com/SnekNOTSnake/tofu-tracker.git and build the AppImage, and (surprisingly enough) the repo's value became tofu-tracker.

Xcode 11 SPM authentication failed because no credentials provided

I started using Swift package manager and when I add repository with https (https://github.com/Alamofire/Alamofire.git) address authentication always fails when I try to login with my github account
Xcode authentication fail
But if I'm using git#github.com:Alamofire/Alamofire.git it will get added successfully. I tried regenerating new key, deleted .ssh directory but nothing makes https work and I still get xcode authentication failed because no credentials were provided error. I could use locally ssh url but in CI I need one with https.
It was a problem with git config. In .gitconfig file it was set to
[url "git#github.com:"]
insteadOf = https://github.com/
After removing this section https worked correctly
EDIT: as mentioned in comments you can easily access your gitconfig in terminal with command: git config --global --edit
In my case with Xcode 11.3.1 I had the same problem and I solved changing de auth method to SSH from HTTPS in Github account preferences on Xcode.
Building off of two previous answers, I solved this by doing what Abrahanfer did, setting Clone using to SSH in Xcode Preferences -> Account.
Then I used the SSH url of the repo, for example: git#github.com:AppPear/SwiftUI-PullToRefresh.git
you can use ssh URLs instead of https, e.g. git#github.com:ORG_NAME/REPO_NAME.git
I double clicked the error message Error while fetching remote repository: git#github.com:ORG/REPO-NAME.git or the The server SSH fingerprint failed to verify
in Xcode's Report Navigator which then a popup appeared asking if I wanted to trust the host. After clicking that I was able to add the Swift Package using SSH.
Selecting HTTPS or SSH in the Xcode Preferences did not fix for me because Xcode seems to automatically handle SSH GitHub URLs in the SPM flow.
what worked for me was both #SimonasDaniliauskas answer and #Abrahanfer answer
Basically in the command line I had to run:
git config --global --unset-all url.git#github.com:.insteadof
And in Xcode I had to go to Xcode > Preferences and switch my GitHub to use SSH
Btw, if you don't have ssh setup, follow this medium post or these GitHub directions. If you need change your ssh keys follow this YouTube tutorial
If you are facing this and your .gitconfig has below, and you want to keep it!
[url "git#github.com:"]
insteadOf = https://github.com/
just add below two lines after above two lines in your .gitconfig
[url "https://github.com/apple"]
insteadOf = https://github.com/apple
Duplicate above two lines and replace /apple with any other /user or /org where you might want to download your packages from
Try removing it and adding it again. If that won't work, remove your GitHub account from Xcode. Usually, git via ssh works better. What CI are you using?
For me, it seems more like a red herring (maybe a fellow developer accidentally checked in this small change related to swift package in project setting). I went to project setting, removed it from under "Swift Packages". It seems okay after that.
I keep having this issue in Xcode 12.0.1 (12A7300).
My GitHub credentials seemed to not work, even though I applied all the suggestions above.
The way I fixed it (for now, at least) was to switch to SSH only authentication.
I managed to get HTTPS working fine with CI. The solution, with bitrise, is to use 'Authenticate host with netrc', then Xcode will find private HTTPS repos properly. I am sure other CI platforms (or your own) can setup the same solution.
Adding repo via source tree and checking out repo through Xcode use some other tool, then adding same repo via SPM. Try creating SSH key via rsa key algorithm instead of ed255189 key algorithm. SPM tool comfortably work with rsa.
Note: rsa key authentication is slower than ed25519 key authentication.
I followed the other anwsers here with no success. Eventually it turned out that the package was added to XCode with my username inside the https domain, like that:
https://yarden_k#bitbucket.org/private/package/path.git
so I had to adjust the accepted answer the same way (I added those lines to .gitconfig file):
[url "git#bitbucket.org:"]
insteadOf = https://yarden_k#bitbucket.org/
And viola! It finally worked. Was a real headache to figure this one out.
Me too facing this problem
Check your repo access is correct and you have proper access for PUSH the code
They only gave me READ access, After facing this issue I'll informed to respective person and get WRITE access

Please make sure you have the correct access right and the repository exists github

When I try to push my changes to my github repo I am receiving the error:
Fatal: 'git#github.comRedHoodJT1988/hello_app.git' does not appear to be a git repository
Fatal: could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
I have looked at the documentation and completed the steps here:https://help.github.com/articles/error-permission-denied-publickey/
As well as looked at other sites and nothing is working. I am able to connect to ssh because I receive the message :Hi RedHoodJT1988...
I am at a loss for what to do next. I am not using a cloud IDE I am on a macbook pro if that helps. Also, not sure if it matters, I am developing a Ruby on Rails application.
You're missing a colon in your address and need to change your remote named origin
git remote remove origin
git remote add origin https://github.com/RedHoodJT1988/hello_app.git
Since it is an SSH URL, there should not be any https involved:
git remote set-url origin git#github.com:RedHoodJT1988/hello_app.git

Remote Git repository unreachable in XCode 5

I have created a remote Git repository for a new project. I have added to my remotes and XCode recognizes it. When creating the new project, I checked the box for Source Control > create git repository on: and selected "Add to New Server"
When I enter my login credentials, I get the following message:
The server https://... is unavailable or may not exist. Check the server address, check your network connection, and then try again.
I have verified that my login is correct and the url is definitely valid. What might I be doing wrong?
Thanks!
Was able to solve my issue using the following:
git remote add origin git#github.com:pheepster/<repoName>.git
git push origin master:master
with the help of: https://stackoverflow.com/a/14470400/2115842
In addition to the two git commands in #Pheepster's answer, I suggest you check you are running the current version of GIT on both the development Mac and Server. Once I had the current version of GIT on both systems the two lines above solved my issue.

Cannot connect to valid github repository

I have read/write access to a private repository owned by someone else but RubyMine cannot connect to the Git URL. Workflow:
Open RubyMine
Click on "Check out from source control"
Select Git
Enter URL, click "Test", and Test fails
I'm using OSX Lion and my Github credentials have already been saved. I've tried connecting to a few other github URLs on the "Explore" tab at github.com and I haven't had any trouble. Suggestions?
I was able to fix this by following the tutorial on GitHub, Generating SSH Keys, exactly. I also deleted any existing keys in my account before adding a new one. In the RubyMine dialog, I pasted the ssh link to my repository instead of the HTTP one. Hope this helps someone else.
https://help.github.com/articles/generating-ssh-keys
I would recommend to create an issue in the RubyMine bugtracker and attach the log file there (Help -> Reveal Log in Finder). Maybe it is a bug in RubyMine support of Git over HTTP.
Meanwhile as a workaround you may use SSH, as adviced by user1836351.
Another workaround is specifying your credentials in the ~/.netrc file.
Example of the file content:
machine github.com
login yourname
password yourpassword

Resources