SCM-Manager with Xcode - xcode

I have installed SCM-Manager. I would like to use it in the future for version control. The problem is, I cannot add it as a repository in Xcode, and I cannot clone it from command line:
$ git clone http://127.0.0.1:8080/scm/git/MyRepo
Cloning into 'MyRepo'...
Checking connectivity... done.
warning: remote HEAD refers to nonexistent ref, unable to checkout.
$
In Xcode I get this message:
fatal: unable to access 'http://127.0.0.1:8080/scm/git/MyRepo/': The requested URL returned error: 403
SCM server logs this
failed to read basic auth credentials
I have tried to install on different server, checkout with different user, nothing helped.

The first message means that you have cloned an empty repository. The message is only a warning and the repository is fully functional. A better way is to create the "bare" repository in SCM-Manager and add the remote reference to a local created repository:
git init MyRepo
git-remote add origin http://127.0.0.1:8080/scm/git/MyRepo/
The messages from Xcode sounds like missing credentials.

Related

Git Submodule - Unable to Access Repository using Linux Subsystem for Windows

I'm trying to add a Git submodule to a different repository. I created the repository I want it in, but the submodule was created by my advisor.
For convenience, let's say the submodule I'm trying to add is repository A and the one I'm trying to add it to is repository B.
A couple of notes:
I'm using the Linux Subsystem for Windows (i.e., the Ubuntu terminal app).
I have an active internet connection and can access both repositories via the standard git commands (git pull, push, commit, etc.)
I can get all my code working fine using symbolic links to A.
Here are the steps I'm taking to add A to B, and the corresponding terminal outputs.
In: git submodule add git#gitlab.com:Respository_B
The above line worked fine, and I can see the correct info in the .gitmodules file, this is the output:
[submodule "Repository_B"]
path = repository_B
url = git#gitlab.com:Repsitory_B
Now, I tried the following two things:
In: git submodule init
Out: fatal: No url found for submodule path 'submodule_A' in .gitmodules
and,
In: git submodule update --remote
Out: setsockopt IPV6_TCLASS 8: Operation not permitted:
I'm stumped. I tried searching for a solution online, but came up empty-handed. Any ideas on how to fix this?
Also, if I need to clarify anything, please let me know.
Thank you!
EDIT
I just read that there are some chmod issues with the Windows subsystem, so I tried this line and got a different error message.
In: sudo git submodule update --remote
Out: git#gitlab.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Unable to fetch in submodule path 'Repository_A'
This is weird, because I am able to access the repository using a symbolic link I made to a local clone.
I'm trying to add is repository A and the one I'm trying to add it to is repository B.
Then the command would be:
cd /path/to/B
git submodule add git#gitlab.com:Respository_A
git commit -m "Add A to B"
git push
Regarding the error message, this issue suggests:
A workaround that we are using is to put the following line in ~/.ssh/config:
AddressFamily inet
Note: Using AddressFamily inet works great if you're connecting to an IPv4 host. If the host is IPv6 only, it won't connect at all.

Trunk push error: "Source code for your Pod was not accessible to CocoaPods Trunk"

I'm having trouble pushing an update to a pod (Audiobus).
"pod trunk push" seems to successfully validate (downloads the git repository, builds, etc), but then drops out with a 403 Forbidden error when doing a POST to /api/v1/pods with the podspec content, along with the message:
"Source code for your Pod was not accessible to CocoaPods Trunk. Is it a private repo or behind a username/password on http?"
I have verified that I'm registered ("pod trunk me" shows I am logged in with correct email address, an owner of the pod).
The repository once required HTTP authentication, but after seeing the above error, I disabled auth. I've verified that there's now open access to the git repository by cloning the repository from a separate, unauthenticated machine (git clone https://developer.audiob.us/download/SDK.git test --single-branch --depth 1 --branch 2.2).
Is this a bug in trunk.cocoapods.org? What am I missing?
Cheers in advance,
Michael
Make sure to make your repo commit tag name the same version name you have on your package podspec file.
I'm surprised by this also, this has been running for a few weeks now and this is the first time a problem has come up. When I run the command locally I don't see a problem. I don't know if you've edited the question, but I had a reference to https://developer.audiob.us/download/SDK.git/?url=download/SDK.git which didn't work with the git ls-remote. Perhaps it doesn't redirect like git clone does?
Any one who may come upon this issue but the other answer does not help. Make sure you have the correct branch in your podspec. Having the incorrect branch will also cause this error to occur.

git clone from bare repository

I created a Visual Studio project using git, later I created a remote bare repository in the path \\xxx.yyy.com\dfs\CORP\Wkg\MoDat\tmp\avl\Repository\WCF\MIlib and added it as origin in Visual Studio, then pushed.
Remote repository seems to be up to date, and from command line a git remote -v in the local folder returns these 2 lines
origin \corp.repower.com\dfs\CORP\Wkg\MoDat\tmp\avl\Repository\WCF\MIlib (fetch)
origin \corp.repower.com\dfs\CORP\Wkg\MoDat\tmp\avl\Repository\WCF\MIlib (push)
I assume I can clone to another local folder from the remote path, so I just copied and pasted exactly the line above to clone it elsewhere
git clone "\\xxx.yyy.com\dfs\CORP\Wkg\MoDat\tmp\avl\Repository\WCF\MIlib" .
Now I get an error
git : Cloning into '.'...
fatal: '\xxx.yyy.com\dfs\CORP\Wkg\MoDat\tmp\avl\Repository\WCF\MIlib' 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 am cloning in the same system in another folder using the same (administrator) user, so it's definitly not relate to access right.
I see in the error that a \ is missing, am I doing something wrong? should the path be somehow escaped?
Are you writing these commands in some kind of bash?
When I was working on Windows I always used forward slashes / instead of backslashes. See if it works for you.

Git repository cloning with GitPython - repository not found Authentication Failed

I am trying to clone private repository using Python. I am using Git Python package to clone the repository but I am getting an error:
Error :
GitCommandError: 'git clone -v https://github.mit.edu/mitx/content-mit-1690rgit edxcourse' returned exit status 128: Cloning into 'edxcourse'...
remote Repository not found.
fatal : Authentication failed for 'https://github.mit.edu/mitx/content-mit-1690.r.git/'
However I am a member of this repository and I have access to the repository.
In your case, gitpython merely returns an error it received from the git executable it envoked.
If you call git clone -v https://github.mit.edu/mitx/content-mit-1690rgit on the commandline, you will receive a similar error, indicating something might be wrong with your URL. Possibly it is the rgit extension, which might be a typo.
Maybe one of the devs can confirm this as I have only been playing around with Git-Python for the last few hours.
When cloning over http(s) it seems to rely on the .netrc file rather than asking for auth like the Git CLI client would.
cat > ${HOME}/.netrc < EOF
machine github.mit.edu
login <username>
password <password>
EOF
chmod 600 ${HOME}/.netrc
If you're on Windows, that works via Cygwin too.
The repository which I was trying to Clone is a secured repo. So I need to establish a secure ssh authentication connection. and then it worked for me.

Unable to Change my Remote Repo

I am a bit new to git, and as a result I have gotten myself into a git mess. I have an Xcode 4.5 project. In the command line I have been managing its local git repo as well as a remote repo on github that the local one is linked to. All was well until I decided to delete the remote repo on the GitHub website (called PictureFly) and create a new remote repo on the GitHub website (called PhotoFly). I would like my local repo to be unlinked to the old remote repo (PictureFly) and linked to the new remote repo (PhotoFly). Seems simple, but no matter what command I enter, I get one fatal warning or another. Here is a typical example of what I have been doing:
My attempts to remove the old remote origin:
//first attempt
git push origin :https://github.com/jac300/PictureFly.git
//first error
fatal: remote part of refspec is not a valid name in
:https://github.com/jac300/PictureFly.git
//second attempt
git push origin :PictureFly.git
//second set of errors
fatal: '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.
//third attempt
git push origin --delete PictureFly
//third set of errors
fatal: '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.
//fourth attempt
git push origin --delete https://github.com/jac300/PictureFly.git
//fourth set of errors
fatal: '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.
Then I thought maybe I can just add the new remote repo:
git remote add origin https://github.com/jac300/PhotoFly.git
fatal: remote origin already exists. //how does it already exist?
So since it "already exists" I tried to push to that repo:
git push -u origin master
fatal: 'git' does not appear to be a git repository
fatal: Could not read from remote repository.
I have no idea what is happening or how to fix it. Any help is appreciated.
You can easily remove the repo on GitHub and create a new empty one from the website. So now you're stuck with your remotes pointing to the wrong url. To fix:
git remote set-url origin https://new.url.here

Resources