Group Group Group Group Group Group Group Group Group

Having Problem Generating Xcode proj from CLI

I have followed along in the text to where we update the package for the “hello-world” project, but when I try to generate the actual Xcode project with:

swift package generate-xcodeproj

I receive an error of “failed to clone; Cloning into bare repository”, and fatal: ‘…/…/…’ does not appear to be a git repository, and fatal: Could not read from remote repository.

Here is the full error text I get when trying to generate the project:

Fetching /Users/adamfeller/Developer/hello-world/https:/github.com/IBM-Swift/Kitura.git

error: failed to clone; Cloning into bare repository ‘/Users/adamfeller/Developer/hello-world/.build/repositories/Kitura.git-5859858057369657479’…

fatal: ‘/Users/adamfeller/Developer/hello-world/https:/github.com/IBM-Swift/Kitura.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.

‘hello-world’ /Users/adamfeller/Developer/hello-world: error: product dependency ‘Kitura’ not found

‘hello-world’ /Users/adamfeller/Developer/hello-world: error: product dependency ‘Kitura’ not found

Is there some additional setup needed? Do I need to create a Git repository, or be logged in to Git?

Thanks in advance.
Adam

@seabaylea Can you please help with this when you get a chance? Thank you - much appreciated! :]

Hi @ajfeller

Can you post the contents of your Package.swift file?

// swift-tools-version:4.2
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: “hello-world”,
dependencies: [
// Dependencies declare other packages that this package depends on.
.package(url: “https:/github.com/IBM-Swift/Kitura.git”, .upToNextMajor(from: “2.5.0”)),
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages which this package depends on.
.target(
name: “hello-world”,
dependencies: [“Kitura”]),
.testTarget(
name: “hello-worldTests”,
dependencies: [“hello-world”, “Kitura”]),
]
)

I just realized what the issue is.

I have the url as https:/github.com/…

insert head to desk emoji here

Glad you got it working!

Yes, thanks for the reply! Sorry for the interruption.