Go get errors "could not read from remote repository" - go-get

Using "go get", I enter this command:
go get github.com/company/code
The repository is private. The error that comes back says this:
go get: module github.com/company/code: git ls-remote -q origin in /Users/myusername/go/pkg/mod/cache/vcs/d3459c3c5732de488c7de6ddbb96dcbb5d3c220735157c316a37c431326e9181: exit status 128:
fatal: 'git#github.comcompany/code' 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.
Note on the first "fatal" line that the URL location does not have a colon between .com and company. I don't know whether that's significant. If it is significant, I don't know where to go to change it. I'd appreciate any tips!
If I ask git to list the remotes, I get
$git remote -v
origin git#github.com:Company/code.git (fetch)
origin git#github.com:Company/code.git (push)
If I push using git ...
$git push
everything up-to-date
Any ideas? Many thanks for your help.

Related

Getting error when pushing github repsoitory

I get this error when pushing a brand new repo, here is the error:
git#github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
I have done research but most are out-dated, I have deleted the folder as well but still gives me this error
1st remove the remote origin:
git remote remove origin
Then add a new remote in this format:
git remote add origin https://github.com/username/repo-name.git

Build error "file not found" after git pull --rebase origin master

Remote repo has made some changes to project settings (added new folder and changed include path). How do I pull these settings into my repo please? I tried
git pull --rebase origin master
And then build the c++ codebase but the build throws "File not found". Appreciate any help this beginner can get.
It is indeed git pull origin master but:
check first git is recognized in your current shell and $PATH
git version
check you are in your local repository
cd /path/to/local/repo
git remote -v
git pull --rebase origin master

Git commit from a bisect

I have only ever used git add . for this project, but somewhere along the line I started getting the strange "modified content, untracked content" error on one of my subdirectories (called users). Other stackoverflow answers didn't work for me. I used checkout to go back through previous commits, but the buggy/untracked subdirectory didn't change with the rest of the directory. I ended up making manual changes to it and then running git checkout master to make sure everything else was back where it started.
Git is saying that I'm bisecting, and it won't let me commit. I looked over stackoverflow answers, and tried some of the following commands:
git pull:
There is no tracking information for the current branch.
Please specify which branch you want to merge with.
git pull origin master:
fatal: 'origin' does not appear to be a git repository
git branch --set-upstream-to=origin/master master:
error: the requested upstream branch 'origin/master' does not exist
hint:
hint: If you are planning on basing your work on an upstream
hint: branch that already exists at the remote, you may need to
hint: run "git fetch" to retrieve it.
hint:
hint: If you are planning to push out a new local branch that
hint: will track its remote counterpart, you may want to use
hint: "git push -u" to set the upstream config as you push.
git pull --rebase:
There is no tracking information for the current branch.
Please specify which branch you want to rebase against.
Apologies if these commands are all over the place. I intend to really learn how git works soon, but right now I just want to commit the changes so I can deploy my project.
UPDATE: I used git bisect reset, created a new branch out of my detached head, and then merged with the master. This kept the changes I made, so now I just need to figure out how to get users tracked again in my commits. git add users still isn't doing anything.

Can not solve Git error "refusing to merge unrelated histories"

When I tried to pull
git pull https://myid#bitbucket.org/myid/abc.git
error occurred
branch HEAD -> FETCH_HEAD
fatal: refusing to merge unrelated histories
Then I tried this
git pull origin master --allow-unrelated-histories
error occurred
fatal: 'origin' does not appear to be a git repository fatal: Could
not read from remote repository.
Then I tried this
git mergetool
error occurred
This message is displayed because 'merge.tool' is not configured. See
'git mergetool --tool-help' or 'git help config' for more details.
'git mergetool' will now attempt to use one of the following tools:
tortoisemerge emerge vimdiff No files need merging
Check branch name
git branch --contains=HEAD
branch is only master
master
I can not figure out how to fix this problem, please teach me what I can do next??

Webstorm Git Install - Error Running Git - Cannot run program "/Applications/GitHub.app": error=13, Permission denied

Newbie alert.
Just installed Webstorm, now trying to get Git configured properly.
I created an empty project in Webstorm and received the warning "Can't start Git" / Applications/GitHub.app Probably the path to Git is not valid"
When I set the path to GitHub in the Applications folder and try to test it, I get the error message "Cannot run program "/Applications/GitHub.app": error=13, Permission denied"
Any suggestion?
Thanks for any support.
in terminal, run 'sudo xcodebuild -license' and then agree to the terms.
reference:
https://intellij-support.jetbrains.com/entries/62745413-Mac-OSX-can-t-start-Git-after-updating-Mac-OS-XCode
Resolved. Sometimes when I'm taught to fish, it takes me a couple trys. So I performed the which git again after thinking about it for a while, and copied the location to the field and it works. So I was confused between the GitHug,app and the actual git executable. THANKS for the pointer to which git