Xcode: Could not read from remote repository - objective-c

I am trying to connect Xcode with Git (Bitbucket).
I read this question/"tutorial":
In XCode 4 how do I add a remote GitHub repository to an existing local project?
I follow all steps but I have a problem.
In Xcode 4.6.1 I always obtain this error:
"fatal "my_Repo" does not appear to be a git repository fatal: Could not read from remote repository."
What can I do? I am very noob with XCode.
Thanks!

This is usually linked to the Bitbucket url you are using for your remote repo.
I prefer using at first an https url (not a git one, or an ssh one), as listed in this BitBucket doc page:
https://accountname#bitbucket.org/accountname/reponame.git
Make sure your repo name and user name are correct, including their case.
The problem is on Xcode, at the moment to make the "Push". Xcode always shows: "Commit or discard the changes and try again." And isn´t true, there aren´t changes
As in this answer, you need to add and commit at least one change in order to be able to push.
The OP Kaisser mentions this tutorial "12 steps to using GitHub with XCode 4".
What he did was:
create an empty project and make the commit and the push, all OK.
Then, I copied my current project and renamed it

I am seeing a similar issue, starting today. I haven't made any commits or pushes to my BitBucket repo in about 2 months, but I never had issues before. XCode is now telling me that the repository "could not be reached" and to "Please verify that the repository is online and reachable and try again". I can commit from the command line. I wonder if this is an XCode 4.6.1 bug?
PS - not sure if I put this in the right place. I've never posted on SO. Correct me if I did this wrong!

Related

How to run Odoo with OCA repositories' modules in Odoo.sh?

I am testing Odoo.sh, trying to run an Odoo 15 Enterprise. I read all the documentation and see several webinars about it, but I am not able to run an instance with any OCA module.
To do that, I followed these steps:
In the Odoo.sh interface, I created a new branch in the Development category, forking from main branch (the one in the Production category). Note: the main branch is the one created by default by Odoo.sh, I didn't make any modification on it and in fact it works OK, I can connect to it.
Also in the Odoo.sh interface, I clicked on the button Submodule and then on Run on Odoo.sh. In the opened pop-up, I added the OCA repository l10n-spain, (version 15.0 of course). The repository works perfectly in a local server. In fact you can try with other OCA repository, the result is going to be the same.
After doing that, Odoo.sh adds the repo to the project with a new [ADD] commit, and tries to make a build of it. However, the tests always fail.
If I go to the log, first, in the install.log section, I can see errors with Pip libraries, so I open a shell and try to fix them, with pip3 check and then adjusting the versions of the libraries it complains of.
After that, when I try to connect to the new build, the odoo.log starts being filled but also with errors, particularly this one:
WARNING xxx odoo.addons.base.models.ir_cron: Tried to poll an undefined table on database xxx.
ERROR xxx odoo.sql_db: bad query:
SELECT latest_version
FROM ir_module_module
WHERE name='base'
ERROR: relation "ir_module_module" does not exist
LINE 3: FROM ir_module_module
^
This error uses to appear when you do a wrong installation of Odoo, but the installation is done by Odoo.sh, so... how can I fix this?
Does anyone experienced the same? Any ideas? May be the Python libraries are the problem?
One problem can be that the requirements file brokest the installation. odoo.sh tries to install it automatically, and because odoo.sh is using outdated python modules, the installation usually breaks.
https://github.com/OCA/l10n-spain/blob/15.0/requirements.txt
You can try to copy the required modules directly to your repository.
Well, in the end I managed to connect to the build after open a shell and writing these commands:
odoosh-restart http
odoo-update all
Still didn't check which of them did the trick.

Bit bucket error while getting clone [duplicate]

I've run into this serious error while committing, and created a bug report.
I keep getting this error on TortoiseGit operations:
git did not exit cleanly (exit code 128)
I've reinstalled the program, rebooted, and tried to clone a fresh repo from github - nothing seems to work. I also deleted %appdata%\Tortoise git folder ... I'm at a loss now. Any advice on how to proceed?
It's probably because your SSH key has been removed/revoked. Make a new one and add it to your GitHub account.
for me I simply had to add configure my git username and email with the following commands:
git config --global user.email "you#example.com"
git config --global user.name "Your Name"
If you're running windows 7:
I was trying to decide the best way to do this securely, but the lazy way is :
right-click the parent folder
click the "properties" button
click the "security" tab
click the "edit" button
click the group that starts with "Users"
click the checkbox that says "full control"
click all the OK's to close the dialogs.
I realize this might circumvent windows "security" features, but it gets the job done.
git-bash reports
fatal: Unable to create <Path to git repo>/.git/index.lock: File exists.
Deleting index.lock makes the error go away.
In my case a folder in my directory named as the git-repository on the server caused the failure.
Deleting index.lock worked for me
on win7 64:
git-gui gives a good answer: a previous git has crashed and left a lock file. Manually remove.
In my case, this was in .git/ref/heads/branchname.lock.
delete, and error 128 goes away. It surprises that tortoisegit doesn't give such an easy explanation.
In my case, it was because of the proxy. A proxy was needed in the corporate network and TortoiseGit / Git does not seems to automatically get information from Windows internet settings. Setting up the proxy address solved the issue.
For me, I tried to check out a SVN-project with TortoiseGit. It worked fine if I used TortoiseSVN though. (May seem obvious, but newcomers may stumble on this one)
In my case, I forgot to add git to the respository name at the end.
I did git revert a multiple times ,and it worked for me make sure un-check the files while reverting you need changes. Stash your changes and pull again.
I was having this same issue and I resolved it in the following way...
I have the NVIDIA "Tegra Android Development Pack" installed and it seems to also have a version of mysysgit.exe with it. TortoiseGit automatically found that installation location (instead of the standard git installation) and auto-populated it in the settings menu.
To correct this, go to: "Settings -> General" and there is a field for the path to mysysgit.exe. Make sure this is pointing to the correct installation.
An quick solution would be to create a new local directory for example c:\git_2014, In this directory rightklick and choose Git Clone
make sure the username and email fields are not empty in the config file. and try to clone to an empty directory. these steps worked for me.
although, it is a very old thread, recently I got this error, and in my case, the link was broken. When the link to GitHub was fixed, it worked.
What has worked for me:
Removing all offending branch related files from all folders in .git\ref and .git\logs

Xcode Build server. Git operation failed

I've got an error on my Build server. It looks like this:
Bot Issue for My OSX Project (build service error)
Integration #1300 of My OSX Project
Open in Xcode: xcbot://xwserver/botID/d127cd23bd4cee1081dfcc192904a85b/integrationID/699d47fa9105419469cca90c6a2a7286
Assertion: Could not open '/Library/Developer/XcodeServer/Integrations/Caches/d127cd23bd4cee1081dfcc192904a85b/Source/xwrtrunk/.git/logs/refs/remotes/origin/AnotherProjectFolderName'
for writing: Is a directory (-1) File: (null):(null)
Introduced 5 integrations ago
Full logs for this integration are attached.
When I changed git repo, everything was great. but with this git repo it always fail. And I don't know what I must do. And even no ideas.
What did we do:
Cut checkouted repo on build server
Checked file system using disc utilities.
P.S. Any way thanks for attention.
Whenever a repo is problematic with XCode, the first workaround is to:
clone it again.
Make XCode reference the newly cloned repo
The OP ZevsVU (doing just that) adds in the comments:
We got this problem when I created a branch folder which name was equal to folder name in the repo.
We just deleted this branch and everything is great at the moment.
Another instance of a similar issue is now (Q4 2021) better presented:
See commit 66e905b, commit a7439d0 (25 Aug 2021) by René Scharfe (rscharfe).
(Merged by Junio C Hamano -- gitster -- in commit 7b06222, 08 Sep 2021)
xopen: explicitly report creation failures
Signed-off-by: René Scharfe
If the flags O_CREAT and O_EXCL are both given then open(2) is supposed to create the file and error out if it already exists.
The error message in that case looks like this:
fatal: could not open 'foo' for writing: File exists
Without further context this is confusing: Why should the existence of the file pose a problem? Isn't that a requirement for writing to it?
Add a more specific error message for that case to tell the user that we actually don't expect the file to preexist, so the example becomes:
fatal: unable to create 'foo': File exists

Egit pull failure showing error

I am facing problem with egit pull option.I can do push in my repo but cannot do pull from the repo. It comes with an error can anyone tell me the full process of pull.After googling i came to know something about fetch but from the site i am not completely aware of the use of it.When i selet team->pull eclipse show me this:"The current branch is not configured for pull No value for key branch.master.merge found in configuration".Help me?
Looks like this answers your question.
The current branch is not configured for pull No value for key branch.master.merge found in configuration
Also if you have command line GIT then you should also be able to do git branch --set-upstream BRANCH-NAME REMOTE-BRANCH-NAME that should set up the remote tracking also.

Xcode 4.2: xcdatamodel is marked as copied

I recently upgraded Xcode to start ios5 development, but for some reason I encounter a very strange
error with xcodes integrated version control. When I add a new model version and try to commit the changes to our repository I just get the following error:
svn: Commit failed (details follow):
svn: Entry for '/Users/r2d2/Documents/workz/ios/blub iPhone 1.1/blub.xcdatamodeld/blub 3.xcdatamodel/elements' is marked as 'copied' but is not itself scheduled
for addition. Perhaps you're committing a target that is
inside an unversioned (or not-yet-versioned) directory?
I could reproduce the bug on all our machines with Xcode 4.2 here.
I get this from Xcode all the time, but a simple commit from the command line always gets around it:
cd myProjectDirectory
svn commit -m 'My commit message.'
Seems to be a problem with Xcode's SVN support.
a mere formality, but here again is the answer for those who didnt find it yet:
use the subclipse for the eclipse IDE to do source control via subversion... any other client
i tried couldn't commit the changes....