Openshift application deployment git - windows

I am creating openshift application during application creation it will give error mention below....
When I see my open shift account application is created.
An exception occurred while creating local git repository.
Clone operation failed, with failed cleanup: Could not delete file C:\Program Files (x86)\Git\y. Manual cleanup may be required.
So how i do manual clean up git respository

It's most likely because that C:\Program Files (x86)\Git\y might already exist and can't automatically be removed. You'll need to remove that file manually.
I'm guessing that you're trying to clone your application into your C:\Program Files (x86)\Git\ which I wouldn't recommend since this is the binary folder for GIT. Try running the rhc app create in your home folder C:\Users\<yourusername and see if that gives you better results.

Related

Xcode Can't Commit Files to Github

I am trying to commit to my local repository but it keeps saying "The working copy “Project” failed to commit files.
warning: unable to access '/Users/me/.config/git/attributes': Permission denied"
I tried this Unable to access 'git/attributes'
It worked for a while but after about an hour of working on my project the error comes back.
I don't know if this is related but some storyboard files are randomly marked for Deletion (with the D beside their file name) when trying to commit.
Sicne that .config folder is supposed to be owned by the user, check, whenever you see again this error:
the new owner of that .config folder (to see of it is root)
the process running at that time (like a local BitBucket server running as root),
or your command history (to see if it involved a command like sudo htop)

Unable to find TeamCity 9.1.x data directory

This is really weird.
I am trying a clean Teamcity 9.1.1 install but the Data Directory is nowhere to be found.
if I access the Global Settings tab under Administration, it lists "C:\Windows\System32\config\systemprofile.BuildServer" - a folder that doesn't exist.
if I try to browse to that folder, it shows me a range of files; uploading a specific file there instead uploads it to C:\Windows\SysWOW64\config\systemprofile.BuildServer.
there is no teamcity-startup.properties file anywhere - I am unable to customize the location of the data directory.
when I restore a backup, the backup files are instead restored to C:\Users\[user name]\.BuildServer rather than in the correct data directory.
Does anyone has any suggestions on how to regain control of the situation? How can I tell TeamCity which data folder to use?
I resolved the situation by:
stopping TC services;
creating a teamcity-startup.properties in [install folder]\conf with the following content:
teamcity.data.path=D:\\[install folder]\\config
restarting TC services;
restoring my backup.
This restored the 9.1.1 install as well as stabilizing the location of the data directory. After this was done, the subsequent installation of 9.1.7 prompted me to uninstall 9.1.1 first (which it hadn’t done the first time around) and the upgrade succeeded.
I believe the system was already compromised at the beginning, unknown to me, due to the data folder being all over the place. Once that was resolved, everything else fell into place.

Xcode project snapshot tries to make disk image?

When Xcode makes it's auto-snapshots, prior to a global find-and-replace for instance, the snapshot is created without error. When I select File -> Create Snapshot the machine chugs away for 10-15 minutes (this is posted without hyperbole), and then fails with an error message similar to:
**Unable to create a snapshot**
fatal: unable to stat 'Users/{me}/Library/Caches/Google/Chrome/Default/Cache/f_00476e': No such file or directory
Yes, that's the cache file for my browser. No, it's not explicitly included in my project. How can I tell Xcode to not do this? I am using the default Snapshot folder, which is
/Users/{me}/Documents/Development/KissQuest/Snapshots
PS -> I don't have the courage to test whether or not the Xcode--auto-generated snapshots are valid.
I'll answer my own question for posterity.
For some reason, there was a .git and .gitK lurking in /users/{me}; I killed those and then git init in the project folder and voila, re-initialized and running git.
git init was not enough; I had to purge the folder tree of bad .gits.

Jenkins can not clone Git repository over Git/SSH on Windows

I have successfully cloned Git repository in Jenkins over Git/SSH on Windows 2008 32-bit. When I tried to do the same on Windows 2008 64-bit, Console Output page gets stuck here:
Démarré par l'utilisateur anonymous
Checkout:book / C:\Jenkins\workspace\book - hudson.remoting.LocalChannel#1da691a
Using strategy: Default
Last Built Revision: Revision 5d7ce4ae23c91fb201ee005e6db17bcd795ca965 (origin/HEAD, origin/master)
Checkout:book / C:\Jenkins\workspace\book - hudson.remoting.LocalChannel#1da691a
Cloning the remote Git repository
Cloning repository origin
When I stop the build (after a few minutes of being stuck there), I get the rest of the error message:
ERROR: Error cloning remote repo 'origin' : Could not clone git#github.com:zeljkofilipin/watirbook.git
ERROR: Cause: Error performing command: C:\Git\bin\git.exe clone --progress -o origin git#github.com:zeljkofilipin/watirbook.git C:\Jenkins\workspace\book
null
Trying next repository
ERROR: Could not clone repository
FATAL: Could not clone
hudson.plugins.git.GitException: Could not clone
at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:1042)
at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:968)
at hudson.FilePath.act(FilePath.java:785)
at hudson.FilePath.act(FilePath.java:767)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:968)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1193)
at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:567)
at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:455)
at hudson.model.Run.run(Run.java:1404)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:230)
I can clone the repository via Git read-only URL git://github.com/zeljkofilipin/watirbook.git from Jenkins on both machines
I can clone via Git/SSH URL git#github.com:zeljkofilipin/watirbook.git from the command line on both machines
I can clone via Git/SSH URL from Jenkins on 32-bit machine, but not on 64-bit machine.
The only difference I can notice between the two machines (not counting that one is a virtual machine on my laptop, and another is a real machine in Switzerland) is that the first one is 32-bit and the second one is 64-bit.
Not sure if that could be related, but 32-bit machine has location set to Croatia, and 64-bit machine to Switzerland (as you can see from Git output in French).
For more information please see my blog post: Jenkins, Windows and Git
I've gone through these pains recently. Especially frustrating is the lack of error logs in this scenario: probably because MSysgit prompts user on the console when trying to recover - which doesn't get through Jenkins console.
Based on my experience here are a few key elements to watch for:
a mix of both Msysgit and Cygwin installed: MSysgit worked better for me- but I assume you're using that too
some people have more luck with <MSYSGIT_ROOT>\cmd\git.cmd than <MSYSGIT_ROOT>\bin\git.exe
making sure your slave runs as the same user (which is not the default upon service-based installs).. - oh I see you got that too
setting HOME variable for windows slaves explicity
basically make sure the same .ssh keys are reached when under Jenkins.
for debugging, I found it useful to create a test job with no SCM, but run git clone in an "Execute shell/batch" build step. That should reveal a bit more info. BTW, you can do an env in the same step and maybe ls %HOME%/.ssh
I think the above is what gave me a working a Windows 7 64bit Jenkins slave with git support - although I thought this had more to do with some other fine config detail than with 64 vs 32 bits. Good luck anyhow!
In the latest version of git, had to use %GIT_HOME%/cmd/git.exe, rather than %GIT_HOME%/bin/git.exe and figuring out the home directory of the user running the jenkins service.
Another issue i faced with was, ssh.exe was not looking at the %userprofile%/.ssh folder for the key files. Instead it was looking to the folder C:\Program Files (x86)\Git\.ssh which was empty and which causes a hang due to ssh authentication prompt on the machine where git repo located.
We just copied the key files under %userprofile%/.ssh to C:\Program Files (x86)\Git\.ssh and the problem is resolved.
Notes from a hard learned lesson.
I had problems getting the ssh to work running Jenkins as a named user account for ssh+git.
Here is what I had to do to solve the problem:
Generate the key using ssh-keygen (note where they are located)
Set "HOME" to this location
I tried with puttygen and GET_SSH=plink that all failed very bad but no clear errors.
When you have to use any configuration options from a per-user configuration file eg. ~/.ssh/config you can put them in C:\Program Files (x86)\Git\etc\ssh\ssh_config, the key files can be put in C:\Program Files (x86)\Git.ssh
If your account is attached to domain. Then you need to make sure user for which the Jenkins Slave is ran. For the purpose open Settings->Properties of "Jenkins Slave"->Log On. and choose necessary user from domain for correct execution.
Since my Windows Jenkins was a slave, I needed to configure that node to find the git in cmd instead of bin as described by inger. To do this, go to Manage Jenkins, Manage Nodes, click on the appropriate node, click on Configure and then go to the Tool Locations. Find git in the drop-down and then specify the path to git.exe (including git.exe), like C:\Program Files\Git\cmd\git.exe.
I confirmed that the cmd/git.exe worked differently than the bin/git.exe from both command-line and with a temporary jenkins job using the git command (instead of an scm repo).
https://wiki.jenkins-ci.org/display/JENKINS/GitHub+Plugin
Just add a ssh-enabled user logon to Jenkins and it should work smoothly.

Setting up a Git repository under Review-Board on Windows Server 2003

I need some help.
I have a Windows Server 2003 computer that I'm setting up with Git and Review-Board.
My Git repositories are managed by Gitolite. The setup is successful and everything is working fine (tested with multiple workstations).
The Review-Board site has installed successfully and is hosted under Apache 2.2. This is also working fine in itself (the website is accessible and responds for workstations), except the part where I'm trying to link Git repositories to Review-Board.
Most tutorials (example: http://ericholscher.com/blog/2011/jan/24/using-reviewboard-git/) provide good details on how to setup a Git repository under Review-Board, except that they refer to Linux/Unix systems, and I am running Windows Server 2003.
My Gitolite repositories are stored under D:\Repositories\Git
Example: D:\Repositories\Git\sdu-test\.git
My understanding is that Review-Board needs a local clone of the repository(ies). Therefore, I created a directory named LocalClones and I cloned my repository.
Example: D:\Repositories\LocalClones\[I cloned sdu-test.git here]
Command used (from LocalClones directory): git clone ../Git/sdu-test.git(the clone was successful)
Now, in Review-Board, I'm trying to declare my sdu-test repository.
Name is 'sdu-test'
Hosting type is 'Custom'
Repository type is 'Git'
Path is 'D:\Repository\LocalClones\sdu-test' (I have also tried with 'sdu-test.git', and 'sdu-test/.git')
Mirror path is 'ssh://git#localhost/sdu-test' (I have also tried simply 'git#localhost:sdu-test', and no mirror path at all)
When I click Save, I get the following error: (11001, 'getaddrinfo failed'). I have no idea what to do about that.
If I try to change the path to a Unix-style path ('/D/Repository/LocalClones/sdu-test'), I get a different error message: Permission denied accessing the local Git repository '/D/Repository/LocalClones/sdu-test'. With a Unix-style path, I could even write a directory path that doesn't exist ('/I/Dont/Exist') and the same permission denied error is returned (the path in the error message does reflect the change though).
Can anyone help me out and tell me how to declare my local Git repository in Review-Board under Windows?
Thank you very much!
** UPDATE ** thank you Tamagochi and VonC for your answers, but unfortunately they're not working for me. Even after fixing the git.py file, I still get the Permission denied accessing the local Git repository '/D/Repository/LocalClones/sdu-test' error message.
There appears to be a bug in ReviewBoard 1.5.5 that causes this error. You can resolve this problem in either of two ways:
Move your repositories to drive C.
Edit \reviewboard\scmtools\git.py file, and replace the following line:
self.git_dir = url_parts[2]
with:
self.git_dir = url_parts[1] + url_parts[2]
Then use the following path: file://D:/Repository/LocalClones/sdu-test
I don't have any experience with ReviewBoard, but from what I can gather (from your link):
you do need to put the full path up to the .git directory of the local clone.
you should make your local clone through an url-based address. If the local file protocol is to be used, you should try with file///D/Repository/LocalClones/sdu-test.
git#localhost:sdu-test would only work if you have a git daemon running.
ssh://git#localhost/sdu-test would only work if you have a ssh daemon running.

Resources